Jet\Validator_ValidationError

The class represents a validation error within the validator subsystem.

Method Description
public __construct(
Validator $validator,
string $code,
string $message,
array $error_data
)
Parameters:
  • $validator The validator instance in which the error occurred.
  • $code String error code.
  • $message Human-readable error message.
  • $error_data Contextual error data.
public getValidator(
) : Validator
Returns the validator instance in which the error occurred.
public getCode(
) : string
Returns the string error code.
public getMessage(
) : string
Returns the human-readable error message.
public getErrorData(
) : array
Returns the contextual error data.
public toJSON(
) : string
Converts error details to JSON.
public jsonSerialize(
) : array
Prepares data for JSON export.
Previous chapter
Jet\Validator_ErrorMessageGenerator
Next chapter
Forms