Class Context
Representation of a validation context.
Methods summary
public
value( string $name
)
: mixed|null
Retrieves a value from the reader adapter.
Retrieves a value from the reader adapter.
Parameters
Returns
mixed|null
The value, or null
if it is not defined.
public
param( string $name
)
: mixed
Retrieves a parameter from the validator parameters.
Retrieves a parameter from the validator parameters.
Parameters
Returns
mixed
Throws
public
option( string $name
, mixed|null $default
= null )
: mixed|null
Retrieves an option from the validator parameters.
Retrieves an option from the validator parameters.
Parameters
Returns
mixed|null
The option value or null
if it is not defined.
Properties summary
public
$attribute
: string
The attribute being validated.
The attribute being validated.
public
$value
: mixed
The value of the attribute being validated.
The value of the attribute being validated.
public
$validator_params
: array
The validator parameters.
The validator parameters.
[]
public
$message
: string
The possible error message for the current validator.
The possible error message for the current validator.
public
$message_args
: array
The arguments for the possible error message.
The arguments for the possible error message.
[]
public
$errors
: Message[][]
[]