validate()
validate(array$data, string $field, string[] $params) : string|bool
Validate the rule.
Parameters
array |
$data | Holds array of data. |
string | $field | Holds the name of the field being validated. |
string[] | $params | Holds an array of parameters (not used for this rule). |
Returns
string|bool —Returns true
if validation is successful (valid integer format), or an error message if
the validation fails.