This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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,
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com