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.
This one is old but I think, the question is still valid.
How can I validate form fields using JSTL?
I would like to remove all leading and trailing spaces and then perform validation such as:
1. Whether or not a parameter is empty 2. Whether or not a non-empty parameter has length X (e.g. 20 characters) 3. Whether or not the given email is a valid email (syntax-only) 4. Whether or not the given website URL is a valid URL (syntax-only) 5. Whether or not some field "abc" is checked. 6. Which of the given radio buttons are checked. 7. Whether or not there are any special characters in the given field (in such a case, I would like to give error)
I did google for this before posting but couldn't find anything appropriate. Please let me know if I have overlooked something.