B
bienwell
Hi all,
I have a problem with the program in ASP.NET. I have a web page that let
users change their passwords with a regularexpressionvalidator that
validates against the new password (8 characters or more) as below. The
page works fine with IE browser. When a user enter a new password that does
not match with this rule (for example "a", he will receive an error
"Invalid password!" from client side. On the contrary, when user uses
Firefox (mozilla) browser, he tried to enter one character "a" ; the page
accepted this data without displaying an error message ="Invalid password!"
from regularexpressionvalidator and saved that password into the table.
What's wrong with this ? What should I do to make the page work properly
with any browser ? Please help!
Thanks in advance.
<td class="dataTD" style="FONT-SIZE: 10pt; WIDTH: 185px"><asp:label
id="LblNew" runat="server" Width="123px">New
Password :</asp:label><label for="NewPassword"></label></td>
<td class="dataTD" style="FONT-SIZE: 10pt"><asp:textbox id="NewPassword"
runat="server" Width="145px" TextMode="Password"></asp:textbox>
<asp:regularexpressionvalidator id="RegularExpressionValidator1"
runat="server" ForeColor="LightCoral" ErrorMessage="Invalid password!"
Display="Dynamic"
ValidationExpression="(?!^[0-9A-Z\W]*$)(?!^[a-zA-Z\W]*$)(?!^[a-z0-9\W]*$)(?!^[0-9a-zA-Z]*$)^([a-zA-Z0-9\W]{8,})$"
ControlToValidate="NewPassword"></asp:regularexpressionvalidator><asp:label
id="ErrNewPassword" runat="server" Width="281px"
ForeColor="LightCoral"></asp:label></td>
Firefox (mozilla) browser.
I have a problem with the program in ASP.NET. I have a web page that let
users change their passwords with a regularexpressionvalidator that
validates against the new password (8 characters or more) as below. The
page works fine with IE browser. When a user enter a new password that does
not match with this rule (for example "a", he will receive an error
"Invalid password!" from client side. On the contrary, when user uses
Firefox (mozilla) browser, he tried to enter one character "a" ; the page
accepted this data without displaying an error message ="Invalid password!"
from regularexpressionvalidator and saved that password into the table.
What's wrong with this ? What should I do to make the page work properly
with any browser ? Please help!
Thanks in advance.
<td class="dataTD" style="FONT-SIZE: 10pt; WIDTH: 185px"><asp:label
id="LblNew" runat="server" Width="123px">New
Password :</asp:label><label for="NewPassword"></label></td>
<td class="dataTD" style="FONT-SIZE: 10pt"><asp:textbox id="NewPassword"
runat="server" Width="145px" TextMode="Password"></asp:textbox>
<asp:regularexpressionvalidator id="RegularExpressionValidator1"
runat="server" ForeColor="LightCoral" ErrorMessage="Invalid password!"
Display="Dynamic"
ValidationExpression="(?!^[0-9A-Z\W]*$)(?!^[a-zA-Z\W]*$)(?!^[a-z0-9\W]*$)(?!^[0-9a-zA-Z]*$)^([a-zA-Z0-9\W]{8,})$"
ControlToValidate="NewPassword"></asp:regularexpressionvalidator><asp:label
id="ErrNewPassword" runat="server" Width="281px"
ForeColor="LightCoral"></asp:label></td>
Firefox (mozilla) browser.