Interface NonConversionValidator<A extends Annotation>

All Superinterfaces:
Policy<A>
All Known Implementing Classes:
AbstractCustomNonConversionValidatorSupport, AbstractNonConversionValidatorSupport, MaxLengthValidator, RegexValidator, RequiredValidator

public interface NonConversionValidator<A extends Annotation> extends Policy<A>
Interface for form field validators used by AnnotationValidationInterceptor and AnnotationValidationInterceptor2 that validate before any conversion.
  • Method Details

    • getMessageType

      Required.MessageType getMessageType()
      Returns whether to write any error message to action errors, field errors, or action messages.
    • getMessage

      String getMessage()
      Returns message set by annotation. Used if getMessageKey() is empty string or it fails to find a message.
    • getMessageKey

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

      boolean getShortCircuit()
      Returns whether rejection by this validator should stop further validation.
    • getProcessNoValue

      boolean getProcessNoValue()
      Returns whether validator should not be skipped if the form field value is empty string.
    • validate

      ValidationResult validate(String fieldValue) throws Exception
      Returns result of validation of form field.
      Throws:
      Exception