Class AbstractConstraint
- java.lang.Object
-
- com.github.damianwajser.validator.constraint.AbstractConstraint
-
- Direct Known Subclasses:
AlphaNumericConstraint,AssertTrueConstraint,Base64Constraint,CardTokenConstraint,CountryIso3166Constraint,DecimalMinConstraint,DigitsConstraint,EmailConstraint,ExpirationCardConstraint,MatchEnumConstraint,MaxConstraint,MinConstraint,NotEmptyConstraint,NotNullConstraint,PasswordConstraint,PastConstraint,PatternConstraint,SizeConstraint,UUIDConstraint,WordConstraint
public abstract class AbstractConstraint extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.http.HttpMethod[]excludesprotected booleanisNulleable
-
Constructor Summary
Constructors Constructor Description AbstractConstraint()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Optional<org.springframework.http.HttpMethod>getCurrentHttpMethod()protected Optional<javax.servlet.http.HttpServletRequest>getCurrentHttpRequest()protected abstract booleanhasError(Object field, javax.validation.ConstraintValidatorContext cxt)protected booleanisExcluded()booleanisValid(Object field, javax.validation.ConstraintValidatorContext cxt)
-
-
-
Method Detail
-
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)
-
-