Interface ValidationErrors

All Known Subinterfaces:
SettingsValidationErrors

public interface ValidationErrors
Used by ContextualFormFragment to report field validation errors.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addFieldError(String fieldName, String errorMessage)
    Add an error message to a specific field.
    void
    addFormError(String errorMessage)
    Add a general error message that will be rendered at the top of the form.
  • Method Details

    • addFieldError

      void addFieldError(@Nonnull String fieldName, @Nonnull String errorMessage)
      Add an error message to a specific field. You can add multiple error messages per field.
      Parameters:
      fieldName - the name attribute value of the field
      errorMessage - the error message. This should be an internationalised String resolved using SAL's I18nResolver.
    • addFormError

      void addFormError(@Nonnull String errorMessage)
      Add a general error message that will be rendered at the top of the form.
      Parameters:
      errorMessage - the error message. This should be an internationalised String resolved using SAL's I18nResolver.