Common Rules
required
Error code: 'REQUIRED'
Example:
{ first_name: 'required' }
not_empty
Error code: 'CANNOT_BE_EMPTY'
Example:
{ first_name: 'not_empty' }
not_empty_list
Checks that list contains at least one element
Error code: 'CANNOT_BE_EMPTY' (If the value is not present or list is empty). If the value is present but it is not a list the error code will be 'FORMAT_ERROR'
Example:
{ products_ids: 'not_empty_list' }
any_object
Checks that the value is an plain object
Error code: 'FORMAT_ERROR' if the value is not a plain object.
Example:
{ address: 'any_object' }