Documentation

RulesValidatorInterface extends ValidatorInterface

This class is a validator that uses rules.

Table of Contents

Methods

getErrors()  : array<string, array<string|int, mixed>>
Get valdiation errors.
hasErrors()  : bool
Does this object have validation errors?
setRules()  : void
validate()  : bool
Perform validations.

Methods

getErrors()

Get valdiation errors.

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

These should be populated when calling validate().

Return values
array<string, array<string|int, mixed>> —

[ item => [errors] ]

hasErrors()

Does this object have validation errors?

public hasErrors() : bool
Return values
bool

setRules()

public setRules(array<string|int, mixed> $rules) : void
Parameters
$rules : array<string|int, mixed>

validate()

Perform validations.

public validate() : bool
Return values
bool —

true if valid, false otherwise

On this page

Search results