Defining nested struct or array item validation can create very nested code. cbvalidation allows for a shortcut to define these structures using a custom field name instead.
For a nested struct, this is done by defining the field as a dot-delimited field name following the nested structure.
This can be continued as many levels deep as necessary.
For a nested array, this is done by defining the field as a dot-delimited field name following the nested structure using an asterisk (*
) to represent the items of the array.
The struct and array shorthand can be combined, as well.