struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samuel.Opoku-Bo...@t-systems.com
Subject AW: Struts Validator with special characters
Date Thu, 27 Nov 2003 14:11:40 GMT
do This:

<global>
		<constant>
			<constant-name>alphanumeric</constant-name>
			<constant-value>^[a-zA-Z0-9\.\ü\Ü\ä\Ä\ß\ö\Ö\-]*$</constant-value>
		</constant>
		<constant>
			<constant-name>alphanumericSP</constant-name>
			<constant-value>^[a-zA-Z0-9\.\ü\Ü\ä\Ä\ß\ö\Ö\-\ ]*$</constant-value>
		</constant>
	</global>


-----Ursprüngliche Nachricht-----
Von: Arne Brutschy [mailto:mai01cvr@studserv.uni-leipzig.de]
Gesendet: Donnerstag, 27. November 2003 12:20
An: struts-user@jakarta.apache.org
Betreff: Struts Validator with special characters


Hello,

I found a problem with the struts validator. It seems that it is not
possible to use special characters (like german "Umlaute") in an
regular expression.. I tried this:

    <constant>
      <constant-name>name</constant-name>
      <constant-value>^[\-\'\`\Ž\.\ a-zäöüßáéíúóàèìùòâêîôûñA-ZÄÖÜÁÉÍÓÚÀÈÌÒÙÑ]+$</constant-value>
    </constant>

Hans Mueller evaluates, Hans Müller doesn't. The RegExp is simple and
works with an external tester.

Even if I use the simpler regexp ^[a-züA-Z]+$ "Hans Müller" does not
evaluate. Is this some sort of encoding problem? I thought, http is
clearly designed for 8bit-use.

Can anybody explain this? Did I something wrong or is this a
struts-bug?


Regards,
Arne


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message