Validates that a value is of a specific data type. For example, if a variable should be an array, you can use this constraint with the array type option to validate this.
type: string default: This value should be of type {{ type }}.
| Parameter | Description |
|---|---|
| {{ type }} | The expected type |
| {{ value }} | The current (invalid) value |
type: string
Allowed types are:
arraydateboolorbooleanfunctionfloatordoubleintorintegernullnumericobjectstring
Also, you can use ctype_*() functions from corresponding locutus implementation:
ctype_alnumctype_alphactype_cntrlctype_digitctype_graphctype_lowerctype_printctype_punctctype_spacectype_upperctype_xdigit