I have a RadMaskedTextBox with a RegularExpressionValidator. I want to allow users to enter a U.S. style phone number in the correct format, but the phone number field is not required. When the page initially loads, the functionality works as expected; the field only fails validation if the user provided input, and that input is invalid. However, if the page fires any Ajax (RadAjaxManager), the validator fires (and fails), even if no input is provided in this field on submit. It will work is proper input is provided, essentially making it the field behave as if a RequiredFieldValidator was placed on it.
<
telerik:RadMaskedTextBox
ID
=
"txtPhone"
runat
=
"server"
Mask
=
"(###) ###-####"
TabIndex
=
"29"
Width
=
"175px"
meta:resourcekey
=
"txtPhoneResource1"
ViewStateMode
=
"Enabled"
DisplayMask
=
"(###) ###-####"
LabelWidth
=
"70px"
Rows
=
"1"
></
telerik:RadMaskedTextBox
>
<
asp:RegularExpressionValidator
ID
=
"txtPhoneRegularExpressionValidator"
runat
=
"server"
ErrorMessage
=
"Format is (###) ###-####"
ControlToValidate
=
"txtPhone"
ValidationExpression
=
"\(\d{3}\)\s\d{3}-\d{4}"
SetFocusOnError
=
"True"
></
asp:RegularExpressionValidator
>