0.10.0
Breaking Changes
-
Removed ValidationResult methods
- getMessage
- setMessage
- getCode
- setCode
- addValidationError
-
Change ResultTransformerInterface
- Added optional ValidationException as second parameter to extract the error message and error code from the exception (and not from the ValidationResult anymore).
Migration
Old
if ($validationResult->isFailed()) {
$validationResult->setMessage('Please check your input');
throw new ValidationException($validationResult);
}
New
if ($validationResult->isFailed()) {
throw new ValidationException('Please check your input', $validationResult);
}