$rules
$rules : array
Rule array.
Abstract validation defines the contract for adding and validating rules.
The AbstractValidation
provides methods for adding validation rules and validating
data against those rules.
$rules : array
Rule array.
validate(array$data, array > $rules, string $sessionName = 'errors') : array<string,mixed>
Validate data against a set of rules.
array |
$data | Holds an array of data to validate. |
array |
$rules | Holds an array of validation rules. |
string | $sessionName | Holds the session name for storing validation errors. |
if validation fails.
Return an array containing valid data.