PDA

View Full Version : valang + alphanumeric



Ellusionist
Aug 29th, 2006, 05:05 AM
Hi,

I want to evaluate a field that requires the user to enter a password. The validation needs to check if the field contains at least 1 numeric field.

My code is :



{ passwordNew: matches('[0-9,a-z,A-Z]', ?) == true : 'Password should contain at least 1 numeric character.' : 'required'}


It does not seem to be working. Any ideas?

Thanks

Arno Werr
Aug 30th, 2006, 02:27 PM
Definitely works on my machine


<bean
id="personValidator"
class="&ValangValidator;">
<property name="valang">
<value>
<![CDATA[
{ name.first : matches('\\w+',?)==true : 'First Name is Empty' : '' }
]]>
</value>
</property>
</bean>

;)