Package play.data.validation
Class ValidationError
java.lang.Object
play.data.validation.ValidationError
A form validation error.
-
Constructor Summary
ConstructorsConstructorDescriptionValidationError(String key, String message) Constructs a newValidationError.ValidationError(String key, String message, List<Object> arguments) Constructs a newValidationError.Constructs a newValidationError. -
Method Summary
-
Constructor Details
-
ValidationError
Constructs a newValidationError.- Parameters:
key- the error keymessage- the error message
-
ValidationError
Constructs a newValidationError.- Parameters:
key- the error keymessage- the error messagearguments- the error message arguments
-
ValidationError
Constructs a newValidationError.- Parameters:
key- the error keymessages- the list of error messagesarguments- the error message arguments
-
-
Method Details
-
key
Returns the error key.- Returns:
- the error key of the message.
-
message
Returns the error message.- Returns:
- the last message in the list of messages.
-
messages
Returns the error messages.- Returns:
- a list of messages.
-
arguments
Returns the error arguments.- Returns:
- a list of error arguments.
-
format
Returns the formatted error message (message + arguments) in the given Messages.- Parameters:
messagesObj- the play.i18n.Messages object containing the language.- Returns:
- the results of messagesObj.at(messages, arguments).
-
toString
-