Class FormErrors

java.lang.Object
org.ametys.plugins.forms.processing.FormErrors

public class FormErrors extends Object
Form errors.
  • Field Details

  • Constructor Details

  • Method Details

    • getForm

      public Form getForm()
      Get the form.
      Returns:
      the form
    • setForm

      public void setForm(Form form)
      Set the form.
      Parameters:
      form - the form to set
    • hasInsertionFailed

      public boolean hasInsertionFailed()
      True if the insertion has failed
      Returns:
      true if the insertion has failed
    • setInsertionFailed

      public void setInsertionFailed(boolean insertionFailed)
      Set if the insertion has failed
      Parameters:
      insertionFailed - true if the insertion has failed
    • getErrors

      Get the errors.
      Returns:
      the errors
    • setErrors

      public void setErrors(Map<String,List<I18nizableText>> errors)
      Set the errors.
      Parameters:
      errors - the errors to set
    • addError

      public void addError(String fieldId, I18nizableText error)
      Add an error.
      Parameters:
      fieldId - the field ID.
      error - the error message.
    • addErrors

      public void addErrors(String fieldId, List<I18nizableText> errors)
      Add an error list.
      Parameters:
      fieldId - the field ID.
      errors - the error messages.
    • hasErrors

      public boolean hasErrors()
      Tests if the form has errors.
      Returns:
      true if there are errors, false otherwise.
    • hasLimitReached

      public boolean hasLimitReached()
      True if the entries limit has been reached
      Returns:
      true if the entries limit has been reached
    • setLimitReached

      public void setLimitReached(boolean limitReached)
      Set if the entries limit has been reached
      Parameters:
      limitReached - true if the entries limit has been reached