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 know this can be done using Javascript and Core
Java and I am not interested in those solutions.
I did google for this before posting but couldn't find anything appropriate. Please let me know if I have overlooked something.
Thanks in advance and kind regards,
Chintan Zaveri.