Create validation options
Options
Set a function that will be executed to see if a validator should be applied or not.
Callback function to check if the validator should apply
If the given field has a value, this validator will be applied.
Field to check for a value
If the given field has one of the value's specified, this validator will be applied.
Field to check for a value
Value(s) to check for
Allow a field to be empty, i.e. a zero length string - '' (true -
default) or require it to be non-zero length (false).
Set the empty option for this validator
Value to set
Get the error message to be used on validation error
Set the error message
Currently set message
Require the field to be submitted (false) or not (true - default).
When set to true the field does not need to be included in the list of
parameters sent by the client - if set to false then it must be
included. This option can be particularly useful in Editor as Editor will
not set a value for fields which have not been submitted - giving the
ability to submit just a partial list of options.
Set the optional option for this validator
Value to set
Common validation options that can be specified for all validation methods.