interface validator_interface

Contract for request validation rules.

Methods

bool
validate(array $data)

Validate the given data.

array
get_errors()

Get the validation errors.

Details

at line 38
bool validate(array $data)

Validate the given data.

Parameters

array $data

Input data (usually from $_POST or $_GET)

Return Value

bool

True if valid

Exceptions

RuntimeException

at line 45
array get_errors()

Get the validation errors.

Return Value

array

field => error message