You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heinen <mh...@googlemail.com> on 2011/01/10 17:52:52 UTC

global validation of all input fields in order to remove forbidden chars?

  Hi,

My app does not work correctly if a user enters an ISO control character 
(e.g. 'START OF HEADING' (U+0001) or ALT+01) in an input field.
I get a xml parsing error on client side if the illegal char is inside 
an attribute (here the value attribute of an input field).
This happens with richfaces in combination with the neko parser.

There seems to be only one solution: Do not allow these special chars 
during input!

Question:
What is the best approach for validating all input fields in a generic way?
Note that the illegal chars must be removed from the value attribute of 
the input field otherwise the rerendering of the errornous input field 
fails again.

Thanks,
Michael