Interface FormErrors

All Known Implementing Classes:
SimpleFormErrors

public interface FormErrors
A container of field and one or more associated errors, to be displayed in a form.

Used by FormValidationException.

  • Method Details

    • getErrors

      @Nonnull Collection<String> getErrors(@Nonnull String field)
      Parameters:
      field - that potentially contains some errors
      Returns:
      the error in question or an empty collection
    • getFieldErrors

      @Nonnull Map<String,Collection<String>> getFieldErrors()
      Returns:
      a map of fields to a collection of at least one associated error
    • getFormErrors

      @Nonnull Collection<String> getFormErrors()
      Returns:
      a collection of errors on the form (ie not attached to a field)
    • isEmpty

      boolean isEmpty()
      Indicates whether this instance of errors is empty, or has any errors.
      Returns:
      true, if this instance of FormErrors contains no errors of any type, false otherwise