validation - JSR 303 - Validate a field if it is not null -


i have form filled in, , of fields options. want apply validations on information filled in optional fields should validated if there filled in, if theses not null. did of similar ? or have suggestion?

thanks.

bean validation constraints accept null valid value (with exception of @notnull of course). depending on ui framework might retrieve empty strings instead of null fields without user input. if you're working jsf 2, can set context parameter javax.faces.validate_empty_fields false avoid validation of empty fields.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -