Hi, Is there a way in Struts to validate a field , only, if it has a value? I have a Email id field which I want to validate only if the user enters a value in that field,if not, I don't want it to validate. Could anyone let me know how this can be done? Thanks,
In the validation framework all validations only run when a value is entered by default (other than the "required" validation of course). You do not need to do anything special.
If you are not using the validation framework you can simply skip validation when a field's value is null or empty string.
A good workman is known by his tools.
It runs on an internal combustion engine. This ad does not:
a bit of art, as a gift, the permaculture playing cards