Class AbstractConstraint

java.lang.Object
com.github.damianwajser.validator.constraint.AbstractConstraint
Direct Known Subclasses:
AlphaNumericConstraint, AssertTrueConstraint, CardTokenConstraint, CountryIso3166Constraint, DecimalMinConstraint, DigitsConstraint, EmailConstraint, ExpirationCardConstraint, MatchEnumConstraint, MaxConstraint, MaxConstraint, MinConstraint, MinConstraint, NotEmptyConstraint, NotNullConstraint, PasswordConstraint, PastConstraint, PatternConstraint, SizeConstraint, UUIDConstraint, WordConstraint

public abstract class AbstractConstraint
extends Object
  • Field Details

    • excludes

      protected org.springframework.http.HttpMethod[] excludes
    • isNulleable

      protected boolean isNulleable
  • Constructor Details

  • Method Details

    • hasError

      protected abstract boolean hasError​(Object field, javax.validation.ConstraintValidatorContext cxt)
    • getCurrentHttpRequest

      protected Optional<javax.servlet.http.HttpServletRequest> getCurrentHttpRequest()
    • getCurrentHttpMethod

      protected Optional<org.springframework.http.HttpMethod> getCurrentHttpMethod()
    • isExcluded

      protected boolean isExcluded()
      Returns:
      true if has exlude request method, false in Other case
    • isValid

      public boolean isValid​(Object field, javax.validation.ConstraintValidatorContext cxt)