T
tshad
I have the following textbox and 3 validators. For some reason the message
"A Password is required!" is displayed with a couple of spaces in front of
it. My other validators don't seem to do this. They are all set to
Dynamic.
<asp:textbox id="Password" TextMode="Password" Columns="25"
runat="server" />
<asp:RegularExpressionValidator
ControlToValidate="Password"
Display="Dynamic"
Text="Your password must contain between 6 and 20 characters!"
ValidationExpression="\w{6,20}"
Runat="Server" />
<asp:RegularExpressionValidator
ControlToValidate="Password"
Display="Dynamic"
Text="Your password must contain at least one number and letter!"
ValidationExpression="([a-zA-Z]+\w*\d+\w*)|([0-9]+\w*\d*)"
Runat="Server" />
<asp:RequiredFieldValidator
ControlToValidate="Password"
Display="Dynamic"
Text="A Password is required!"
runat="server" />
The View source shows:
******************************************************************
<input name="_ctl0assword" type="password" size="25" id="_ctl0_Password"
/>
<span id="_ctl0__ctl3" controltovalidate="_ctl0_Password" display="Dynamic"
evaluationfunction="RegularExpressionValidatorEvaluateIsValid"
validationexpression="\w{6,20}" style="color:Red;display:none;">Your
password must contain between 6 and 20 characters!</span>
<span id="_ctl0__ctl4" controltovalidate="_ctl0_Password" display="Dynamic"
evaluationfunction="RegularExpressionValidatorEvaluateIsValid"
validationexpression="([a-zA-Z]+\w*\d+\w*)|([0-9]+\w*\d*)"
style="color:Red;display:none;">Your password must contain at least one
number and letter!</span>
<span id="_ctl0__ctl5" controltovalidate="_ctl0_Password" display="Dynamic"
isvalid="False" evaluationfunction="RequiredFieldValidatorEvaluateIsValid"
initialvalue="" style="color:Red;">A Password is required!</span>
******************************************************************
What is causing the extra spaces and why is the other validators even
showing up, if they are not displaying.
Thanks,
Tom
"A Password is required!" is displayed with a couple of spaces in front of
it. My other validators don't seem to do this. They are all set to
Dynamic.
<asp:textbox id="Password" TextMode="Password" Columns="25"
runat="server" />
<asp:RegularExpressionValidator
ControlToValidate="Password"
Display="Dynamic"
Text="Your password must contain between 6 and 20 characters!"
ValidationExpression="\w{6,20}"
Runat="Server" />
<asp:RegularExpressionValidator
ControlToValidate="Password"
Display="Dynamic"
Text="Your password must contain at least one number and letter!"
ValidationExpression="([a-zA-Z]+\w*\d+\w*)|([0-9]+\w*\d*)"
Runat="Server" />
<asp:RequiredFieldValidator
ControlToValidate="Password"
Display="Dynamic"
Text="A Password is required!"
runat="server" />
The View source shows:
******************************************************************
<input name="_ctl0assword" type="password" size="25" id="_ctl0_Password"
/>
<span id="_ctl0__ctl3" controltovalidate="_ctl0_Password" display="Dynamic"
evaluationfunction="RegularExpressionValidatorEvaluateIsValid"
validationexpression="\w{6,20}" style="color:Red;display:none;">Your
password must contain between 6 and 20 characters!</span>
<span id="_ctl0__ctl4" controltovalidate="_ctl0_Password" display="Dynamic"
evaluationfunction="RegularExpressionValidatorEvaluateIsValid"
validationexpression="([a-zA-Z]+\w*\d+\w*)|([0-9]+\w*\d*)"
style="color:Red;display:none;">Your password must contain at least one
number and letter!</span>
<span id="_ctl0__ctl5" controltovalidate="_ctl0_Password" display="Dynamic"
isvalid="False" evaluationfunction="RequiredFieldValidatorEvaluateIsValid"
initialvalue="" style="color:Red;">A Password is required!</span>
******************************************************************
What is causing the extra spaces and why is the other validators even
showing up, if they are not displaying.
Thanks,
Tom