Class AbstractConstraint
java.lang.Object
com.github.damianwajser.validator.constraint.AbstractConstraint
- Direct Known Subclasses:
AlphaNumericConstraint,AssertTrueConstraint,CardTokenConstraint,CountryIso3166Constraint,EmailConstraint,ExpirationCardConstraint,MatchEnumConstraint,MaxConstraint,MinConstraint,NotEmptyConstraint,NotNullConstraint,PasswordConstraint,PastConstraint,PatternConstraint,SizeConstraint
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
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)
-
Field Details
-
excludes
protected org.springframework.http.HttpMethod[] excludes -
isNulleable
protected boolean isNulleable
-
-
Constructor Details
-
AbstractConstraint
public AbstractConstraint()
-
-
Method Details
-
hasError
-
getCurrentHttpRequest
-
getCurrentHttpMethod
-
isExcluded
protected boolean isExcluded()- Returns:
- true if has exlude request method, false in Other case
-
isValid
-