Package org.ametys.plugins.forms
Class FormErrors
java.lang.Object
org.ametys.plugins.forms.FormErrors
Form errors.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Multimap<String,
I18nizableText> The errors as a Map of field ID -> error messages. -
Constructor Summary
ConstructorDescriptionDefault constructor.FormErrors
(Multimap<String, I18nizableText> errors) Constructor with parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addError
(String fieldId, I18nizableText error) Add an error.Get the errors.boolean
Tests if the form has errors.void
setErrors
(Multimap<String, I18nizableText> errors) Set the errors.
-
Field Details
-
_errors
The errors as a Map of field ID -> error messages.
-
-
Constructor Details
-
FormErrors
public FormErrors()Default constructor. -
FormErrors
Constructor with parameters.- Parameters:
errors
- the errors.
-
-
Method Details
-
getErrors
Get the errors.- Returns:
- the errors
-
setErrors
Set the errors.- Parameters:
errors
- the errors to set
-
addError
Add an error.- Parameters:
fieldId
- the field ID.error
- the error message.
-
hasErrors
Tests if the form has errors.- Returns:
- true if there are errors, false otherwise.
-