![]() validates that the annotated property value has a size between the attributes min and max can be applied to String, Collection, Map, and array properties.validates that the annotated property value is true.validates that the annotated property value is not null.Private String = 18, message = "Age should not be less than = 150, message = "Age should not be greater than 150")Īll of the annotations used in the example are standard JSR annotations: = "About Me must be between 10 and 200 characters") Private String boolean = 10, max = 200, message ![]() Public class User = "Name cannot be null") Here, we'll take a User bean and work on adding some simple validation to it: import
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |