abstract class RequestValidation (View source)

Methods

__construct()

TodoValidation constructor.

bool
authorize()

The define the user authorization level

authorizationFailAction()

When the user does not have the authorization to launch this request This is hook the method that can watch them for make an action

array
keys()

The allowed validation key

array
rules()

The rules list

array
messages()

The define the user custom message

bool
fails()

Check if the query

validationFailAction()

When user have not authorized to launch a request This is hook the method that can watch them for make an action This method able to custom fail exception

void
throwError()

Throws an exception

__call(string $name, array $arguments)

__call

string
__get(string $name)

__get

getValidationInstance()

Get the validator instance

string
getMessage()

Get the message of the last error

array
getMessages()

Get all errors messages

array
getValidationData()

Get validation data

getRequest()

Get the current request

Details

__construct()

TodoValidation constructor.

Exceptions

protected bool authorize()

The define the user authorization level

Return Value

bool

protected authorizationFailAction()

When the user does not have the authorization to launch this request This is hook the method that can watch them for make an action

protected array keys()

The allowed validation key

Return Value

array

protected array rules()

The rules list

Return Value

array

protected array messages()

The define the user custom message

Return Value

array

protected bool fails()

Check if the query

Return Value

bool

protected validationFailAction()

When user have not authorized to launch a request This is hook the method that can watch them for make an action This method able to custom fail exception

protected void throwError()

Throws an exception

Return Value

void

Exceptions

ValidationException;

Request __call(string $name, array $arguments)

__call

Parameters

string $name
array $arguments

Return Value

Request

string __get(string $name)

__get

Parameters

string $name

Return Value

string

protected Validate getValidationInstance()

Get the validator instance

Return Value

Validate

protected string getMessage()

Get the message of the last error

Return Value

string

protected array getMessages()

Get all errors messages

Return Value

array

protected array getValidationData()

Get validation data

Return Value

array

protected Request getRequest()

Get the current request

Return Value

Request