473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Validators putting space in front of message

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="_ctl0:Password" type="password" size="25" id="_ctl0_Password"
/>
<span id="_ctl0__ctl3" controltovalidate="_ctl0_Password" display="Dynamic"
evaluationfunction="RegularExpressionValidatorEval uateIsValid"
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="RegularExpressionValidatorEval uateIsValid"
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="RequiredFieldValidatorEvaluate IsValid"
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
Jun 28 '06 #1
0 964

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
6
by: tshad | last post by:
I have the following on one of my Textboxes: <asp:RequiredFieldValidator ControlToValidate="email" Text="Email Required" runat="server" /> <asp:RegularExpressionValidator...
1
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.