Saturday, March 24, 2012

My MaskedEditValidator doesnt seem to want to work

I have the following code...

<asp:TextBoxID="txtPhone"runat="server"skinid="txtGeneralText"/>

<cc1:maskededitextenderrunat="server"id="mePhoneNumber"targetcontrolid="txtPhone"mask="(999) 999-9999"masktype="Number"clearmaskonlostfocus="false"/>

<cc1:maskededitvalidatorrunat="server" id="mePhoneNumberValidator"controltovalidate="txtPhone"controlextender="mePhoneNumber"errormessage="You must enter a Phone Number"display="None"ValidationExpression="^\([2-9]\d{2}\)\s\d{3}\-\d{4}$"validationgroup="PhoneValidators"/>

<cc1:validatorcalloutextenderrunat="server"id="vPhoneExtender"targetcontrolid="mePhoneNumberValidator"/>

The validator keeps returning "You must enter a Phone Number" even after a valid phone number is entered

I have tried everything, but I am obviously missing something

Can anyone help ?

Thanks

Brian

I've been having similar problems with validators working correctly until I removed the ValidationGroup. Try that and see if it helps.

Rick

No comments:

Post a Comment