ValidationException
class ValidationException extends Exception (View source)
Exception thrown by DataObject::write if validation fails. By throwing an exception rather than a user error, the exception can be caught in unit tests and as such can be used as a successful test.
Properties
protected | ValidationResult | $result | The contained ValidationResult related to this error |
Methods
public
__construct(ValidationResult|string $result = null, string|int $message = null, int $code = 0)
Construct a new ValidationException with an optional ValidationResult object
Details
__construct(ValidationResult|string $result = null, string|int $message = null, int $code = 0)
Construct a new ValidationException with an optional ValidationResult object
ValidationResult
getResult()
Retrieves the ValidationResult related to this error