Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Web Validation - Invalid Characters

807603Dec 11 2007 — edited Dec 12 2007
I'm working on web form (member registration) that must work in many languages. I'm struggling trying to come up with the best way to determine what characters to allow in things like Name, Address, etc...

I believe the regular expression: [\p{L}\p{N} ,-'\(\)] will match letters and numbers (in any language - not just ASCII chars) plus space plus a few punctuations.

What are people's thoughts on these criteria? Too restrictive? Too broad? What's the Java standard on this sort of thing, if there is one?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2008
Added on Dec 11 2007
4 comments
320 views