public class RegexConstraint extends Constraint
mErrorMessage
Constructor and Description |
---|
RegexConstraint(String pErrorMessage,
String pRegex)
Create a new RegexConstraint with the given regexp.
|
Modifier and Type | Method and Description |
---|---|
String |
getRegex() |
boolean |
isValid(Object pValue)
Validate that the given value matches the defined regular expression.
|
String |
toString() |
describeError, equals, hashCode
public String getRegex()
public boolean isValid(Object pValue)
isValid
in class Constraint
pValue
- a value to match against the defined regular expression.null
public String toString()
toString
in class Constraint
© 1998- 2021 Escenic AS