commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [validator] Trouble using global constants in variable values
Date Thu, 11 Feb 2010 01:55:31 GMT
Hash: SHA1


On 2/10/2010 7:21 PM, Niall Pemberton wrote:
> You could try testing you're expression directly using
> GenericValidator.matchRegexp() until you're happy it works.

That's good to know.

After dinner and a few drinks, I realized something: commons-validator
uses jakarta-oro as it's pattern matcher, right? Well, then my use of
the java.util.regex.Pattern pattern descriptors does me no good, then,
does it?

I'm looking for jakarta-oro's pattern syntax, but I can't seem to find a
reference to it, other than that it is "Perl 5 compatible". Perl 5 says
stuff like \p{...} works, but I'll have to look at it in more detail.
It's also possible that ORO doesn't really provide the Unicode portion
of the Perl 5 regexp pattern syntax. The project is somewhat stale...

> If it seems correct, but still doesn't seem to work in your Struts app
> then perhaps you could write a Struts plugin to retrieve the validator
> resources and display the values for the forms/fields/arguments:

I may also just write my own validator that uses java.util.regex and
replace the one that ships with commons-validator. I can see that in the
trunk there is such a class, but it hasn't gone into a release, yet.

> Struts has documentation on using validator:

I should have thought of that, what with using it with Struts and all...
but I decided to go right to the source instead. I'll check the
validator FAQs on Struts and see how they look.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message