Class RequiredStringEntriesValidator

All Implemented Interfaces:
ListPostConversionValidator<RequiredStringEntries,String>, Policy<RequiredStringEntries>

public class RequiredStringEntriesValidator extends AbstractListPostConversionValidatorSupport<RequiredStringEntries,String>
  • Constructor Details

    • RequiredStringEntriesValidator

      public RequiredStringEntriesValidator()
  • 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.
    • getRecipientClass

      public Class<String> getRecipientClass()
      Description copied from interface: ListPostConversionValidator
      Returns item types of recipient collection fields that can receive converted form value. Not to be confused with collection type.
    • 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 ValidationResult validate(Collection<String> formValue) throws Exception
      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.
      Throws:
      Exception