Menu

## ValidatorInterface
in

ValidatorInterface.php : 5

### Table of Contents

addRule() : mixed
  Adds a ValidatorRule to use with the created Validator.
getErrors() : array<string|int, mixed>
  Returns all the errors in a multidimensional array with each error nested under the data field's name.
validate() : mixed
  Validates a field's value using the provided ValidatorRule's map name.

### Methods

#### addRule()

ValidatorInterface.php : 14

Adds a ValidatorRule to use with the created Validator.

`public addRule(string $identifier, string $rule) : mixed`

##### Parameters

$identifier : string

  The "map name" or name to reference this rule by.

$rule : string

  The ValidatorRule's namespace (FQPN).

##### Return values

mixed —

#### getErrors()

ValidatorInterface.php : 30

Returns all the errors in a multidimensional array with each error nested under the data field's name.

`public getErrors() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### validate()

ValidatorInterface.php : 23

Validates a field's value using the provided ValidatorRule's map name.

`public validate(array<string|int, mixed> $data, bool $sendErrorResponses) : mixed`

##### Parameters

$data : array<string|int, mixed>
$sendErrorResponses : bool

##### Return values

mixed —

## Search results