I need to validate my web app to allow both english and european
characters (anything else I'll reject). I can do it by allowing
individual characters in the mask i.e.
>From validation.xml :
<constant>
<constant-name>alphaForeignCheck</constant-name>
<constant-value>^[a-zA-Z è\s]*$</constant-value>
</constant>
This will allow for alphas and è. But rather than list individual
foreign characters is there a way to group say all french all german
characters?
Oliver Wong - 31 Mar 2006 18:55 GMT
> I need to validate my web app to allow both english and european
> characters (anything else I'll reject). I can do it by allowing
[quoted text clipped - 10 lines]
> foreign characters is there a way to group say all french all german
> characters?
Unicode code charts are at: http://www.unicode.org/charts/
You'll probably want \u00c0 to \u00FF, except not \u00f7 and \u00d7. You
might want to also look at Latin Extended A and Latin Extended B.
Perhaps you can save yourself a lot of effort and do the validation in Java,
via Character.isLetter()
- Oliver