Interface ServiceCommandValidator
- All Known Implementing Classes:
DefaultServiceCommandValidator
public interface ServiceCommandValidator
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldValidationError
(FieldValidationError fieldError) Add a new field validation error.void
addFieldValidationError
(String fieldName, String messageKey) Add a new validation error.void
addFieldValidationError
(String fieldName, String messageKey, Object... messageArguments) Add a new validation error.void
addValidationError
(String messageKey, Object... messageArguments) Add a new validation error.Get all validation errors.
-
Method Details
-
addFieldValidationError
Add a new validation error.- Parameters:
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error message
-
addValidationError
Add a new validation error.- Parameters:
messageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message
-
addFieldValidationError
Add a new validation error.- Parameters:
fieldName
- the field that is not validmessageKey
- the i18n key for the validation error messagemessageArguments
- the arguments to be merged into the error message.
-
addFieldValidationError
Add a new field validation error.- Parameters:
fieldError
- the error to add
-
getValidationErrors
Collection<ValidationError> getValidationErrors()Get all validation errors.- Returns:
- validation errors.
-