This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
My requirement is, I have 3 fields in a jsp and I should throw an error message if all the 3 fields are null or empty. If anyone of the field is NOT NULL, then it should NOT throw an error. I'm using Struts 2 validation framework with validation.xml file. I need to do it as a client side validation. I tried the following code but its not working. Can anyone please send a sample code to make this run.
((searchdata.lastName)==null) and ((searchdata.policyNumber)==null) and ((searchdata.policyDate)==null)
<message>Enter Last Name or Policy Number or Policy Date.</message>
You can see more syntax in workx2 in library files
<field name="firstname"> it shoud be same as your jsp property name
<field-validator type="requiredstring"> check for empty text
<message>Your message</message> write your message to appear in jsp