Validator
in package
implements
ValidatorInterface
AbstractYes
Validator base class.<br> Implements a default validate method.
Tags
Table of Contents
Interfaces
- ValidatorInterface
- Validator interface.
Methods
- __construct() : mixed
- Validator constructor.
- validate() : true
- Validate user data
Methods
__construct()
Validator constructor.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Attributes to validate.
validate()
Validate user data
public
validate() : true
Tags
Return values
true —if validation is successful, throw an exception otherwise.