Validator\DefaultValidator
This is the default Validator. It supports all available error checks.
Properties
.disableErrorCheckFields
List of field names which should not get validated.
Use the special value 'all' to disable all error checks.
Since Version 2.0 you can disable specific error checks. See the example code below.
Data type
Comma separated list | cObj
Version added
1.0.0
Example code
disableErrorCheckFields = firstname,lastname disableErrorCheckFields = all #Since Version 2.0 you can disable specific error checks: validators { 1.class = Validator\DefaultValidator 1.config { disableErrorCheckFields { name = maxLength email = email } } } #This disables the check "maxLength" for field name and the check "email" for the field email. #If you want to disable all checks for a field, just leave the value empty: validators { 1.class = Validator\DefaultValidator 1.config { disableErrorCheckFields { name = email = email } } } #This disables all checks for the field name. #The old syntax is still compatible, but cannot be mixed with the new one. disableErrorCheckFields = name,email
.restrictErrorChecks
List of error checks to perform. If this is set, only these error checks will be executed, all other configured error checks will be ignored.
Data type
Comma separated list | cObj
Version added
1.0.0
.fieldConf.[fieldname].
Array containing the error check options.
Data type
Array
Version added
1.0.0
Example code
fieldConf { name { errorCheck { 1 = required 2 = maxLength 2.value = 50 } } email { errorCheck { 1 = required 2 = email } } }