Class AbstractCustomListPostConversionValidatorSupport<T>

All Implemented Interfaces:
ListPostConversionValidator<CustomListPostConversionValidation,T>, Policy<CustomListPostConversionValidation>

public abstract class AbstractCustomListPostConversionValidatorSupport<T> extends AbstractListPostConversionValidatorSupport<CustomListPostConversionValidation,T>
Template class for custom list validators that validates a converted array or collection form field. Despite the name, recipient form fields can be non-list collections and arrays. This is useful for validating the list as a whole, such as non-empty list, and are run after individual entry post-conversion validators. Subclasses must implement ListPostConversionValidator.getRecipientClass() and #validate.
  • Constructor Details

    • AbstractCustomListPostConversionValidatorSupport

      public AbstractCustomListPostConversionValidatorSupport()
  • Method Details

    • getMessageType

      public Required.MessageType getMessageType()
      Description copied from interface: ListPostConversionValidator
      Returns whether to write any error message to action errors, field errors, or action messages.
    • getMessage

      public String getMessage()
      Description copied from interface: ListPostConversionValidator
      Returns message set by annotation. Used if ListPostConversionValidator.getMessageKey() is empty string or it fails to find a message.
    • getMessageKey

      public String getMessageKey()
      Description copied from interface: ListPostConversionValidator
      Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.
    • getShortCircuit

      public boolean getShortCircuit()
      Description copied from interface: ListPostConversionValidator
      Returns whether rejection by this validator should stop further validation.
    • getProcessNoValue

      public boolean getProcessNoValue()
      Description copied from interface: ListPostConversionValidator
      Returns whether validator should not be skipped if conversion was skipped.
    • validate

      public abstract ValidationResult validate(Collection<T> formValue)
      Description copied from interface: ListPostConversionValidator
      Returns result of checking converted form field value and message to use if failed. This is not called if the form value is empty string or null or the conversion failed.