Hi, Has any one done input validation of numeric fields in struts, like i want to validate number of digits after decimal or lenght of the numeric field like the valid values will be 123.34, but 1234.4 is invalid, I am using dynavalidatorform , so would like some code to put in validation.xml or in strutsvalidator does any one have this kind of validation code,
posted 13 years ago
There are a standard number of validations that struts provides which are listed in the validator-rules.xml file. If you need to implement your own custom validations, you can add another rule to that xml file or create a new file to put your rule in. You just have to make sure to add it to the struts-config.xml file. To make your own rule, you just have to follow the standard method signature that the normal rules follow. Let me know if this helps.