KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can i use @Pattern constraint on non-mandatory form fields ? @Pattern(regexp="...") private String something; as soon as i submit my form, i get validation error as expected but the user may leave the field empty, since this is not a mandatory field. PS: i could write my own constraint annotation. However, i just ask an easier way combining annotations or adding annotation attributes. JSR303 implementation is hibernate-validator.
Tags (comma-separated)
Save Edits
Cancel