public class ValidationConstraint extends Object
"lastName": [{
"type": "NotBlank",
"message": "may not be empty"
}],
"email": [{
"type": "NotNull",
"message": "may not be null"
}, {
"type": "Email",
"message": "not a well-formed email address",
"flags": [],
"regexp": ".*"
}],
< lastName>
< type>NotBlank
< message>may not be empty
< /lastName>
< email>
< type>NotNull
< message>may not be null
< /email>
< email>
< type>Email
< message>not a well-formed email address
< regexp>.*
< /email>
| Constructor and Description |
|---|
ValidationConstraint() |
| Modifier and Type | Method and Description |
|---|---|
Object |
addAttribute(String attrKey,
Object attribute)
Add attribute to the current constraint definition.
|
boolean |
equals(Object o) |
Map<String,Object> |
getAttributes() |
String |
getMessage() |
String |
getType() |
int |
hashCode() |
void |
setAttributes(Map<String,Object> attributes) |
void |
setMessage(String message) |
void |
setType(String type) |
public String getType()
public void setType(String type)
public String getMessage()
public void setMessage(String message)
public Object addAttribute(String attrKey, Object attribute)
attrKey - attribute key identifierattribute - attribute valueCopyright © 2009–2014. All rights reserved.