Maybe the MXML compiler is trying to interpret the {6, 8} as a binding
expression similar to {newPassword}. Try setting the 'expression'
property in an initialize handler instead.

 

- Gordon

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of DJ Lift
Sent: Friday, November 17, 2006 9:23 AM
To: [email protected]
Subject: [flexcoders] RegExp Validator

 

Hey there,
I'm trying to use a standard regular expression in a RegExpValidator.

Here's the validator markup:
<mx:RegExpValidator id="newPasswordValidator"
expression="[a-zA-Z0-9]{6,8}"
source="{newPassword}" property="text" requiredFieldError="This fields
is required." 
noMatchError="Passwords must be 6 to 8 characters in length and include
letters and 
numbers"/>

It keeps saying that a password like '64months' (without the
apostrophes) is no good when it 
should be. The expression should validate such that any characters from
a-z and A-Z and 
0-9 should be ok, as long as the total length of chars is between 6 - 8
chars long. This 
expresion works great in PHP. 

I must be missing something about how AS or Flex deals with it. Any help
would be 
appreciated.
thanksie,
marky

 

Reply via email to