ValidationException
class ValidationException extends Exception (View source)
Exception thrown by {@link 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.
Methods
__construct(ValidationResult|string $result = null, string|int $message = null, int $code = 0)
Construct a new ValidationException with an optional ValidationResult object
getResult()
Retrieves the ValidationResult related to this error
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