Commons Validator Javascript Update?

5 views
Skip to first unread message

John Vance

unread,
Sep 17, 2009, 7:55:21 PM9/17/09
to spring-modules-fork
Hey all,

I've hacked around JavascriptValidatorTag.java so that it's more or
less compatible with Commons Validator 1.3. It now will use the form
name in building the validation methods, as the newer javascript
methods expect. I've also pared down validator-rules.xml so that it
uses the js files supplied by the commons validator jar. However, it
does not handle formnames starting with a "/" - the Struts version had
code to walk the action mappings and pull the appropriate form name,
but I wasn't sure where the equivalent Spring information would be.
It also doesn't handle the Commons Validator 1.2+ stopOnError
attribute for the same reason.

This fixes a few problems that the client side commons validator had -
it did not validate emails properly (domains like .info were
rejected), it could not handle multiple radio buttons, and probably
other issues that have been fixed in the past 5 years.

If you're interested in the files, let me know.

Antony Stubbs

unread,
Sep 18, 2009, 4:31:23 AM9/18/09
to John Vance, spring-modules-fork
yup! - sounds good...
Reply all
Reply to author
Forward
0 new messages