Skip to content

Validator

Mehdi Bounya edited this page Jul 14, 2018 · 2 revisions

The \PHPForms\Validator() class is used to validate data.

Content

\PHPForms\Validator() methods

construct

isValid

  • Returns: bool

Check if the passed data is valid, returns TRUE if valid or FALSE otherwise.

getValidData

  • Returns: array

Returns an array of data that passed the validation rules, this method must be called after calling isValid()

getErrors

  • Returns: array

Returns an array of validation errors, this method must be called after calling isValid()

Clone this wiki locally