Class ValidationConstraint
- java.lang.Object
-
- io.rocketbase.commons.dto.validation.ValidationConstraint
-
public class ValidationConstraint extends Object
Object representation of validation constraints. Sample JSON serialization:"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": ".*" }]
-
-
Constructor Summary
Constructors Constructor Description ValidationConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectaddAttribute(String attrKey, Object attribute)Add attribute to the current constraint definition.Map<String,Object>getAttributes()voidsetAttributes(Map<String,Object> attributes)
-