Anpassungen css required validatoren

This commit is contained in:
ja
2021-10-19 10:22:34 +02:00
parent 5cc2a30fee
commit ce69b2e1ce
5 changed files with 104 additions and 51 deletions

View File

@@ -160,33 +160,42 @@
<asp:Label ID="lbl_Ueberschrift" runat="server" Text="Password change:" style="margin-left:55px"></asp:Label>
</td>
</tr>
<tr style="color:#003680;height:36.67px;">
<tr style="color:#003680;height:26.67px;">
<td colspan="4">
<asp:TextBox id="txt_Pw" CssClass="bg-key-icon" runat="server" TextMode="Password" Width="250px" Font-Names="Verdana" OnTextChanged="txt_Pw_TextChanged" AutoCompleteType="Disabled" style="margin-left:42px;color:#003680" OnClick="this.value='';" Placeholder="Enter Password"></asp:TextBox>
<span></span>
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="13px" Width="13px" style="margin-left:32px" ToolTip="The Password has to contain minimum 4 characters. It must have at least 1 special character, one uppercase letter and at least 1 downcase letter at an maximum of 30 characters."/>
</td>
</td>
</tr>
<tr style="color:#003680;height:10px;">
<td>
<asp:RegularExpressionValidator ID="reqPassw1txt" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw" ValidationGroup="TXT_val" ForeColor="Red" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
</tr>
<tr style="color:#003680;height:36.67px;">
<td>
<asp:TextBox id="txt_Pw_WH" CssClass="bg-key-icon" Width="250px" OnTextChanged="txt_Pw_WH_TextChanged" runat="server" TextMode="Password" Font-Names="Verdana" AutoCompleteType="Disabled" style="margin-left:42px;color:#003680" OnClick="this.value='';" Placeholder="Repeat Password"></asp:TextBox>
<span></span>
<asp:Image ID="Image2" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="13px" Width="13px" style="margin-left:32px" ToolTip="The passwords have to match with each other."/>
</td>
</tr>
<tr>
<td colspan="4">
<asp:RequiredFieldValidator ID="reqPasswtxt" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw_WH" ErrorMessage="Please repeat the password!" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color:#003680;height:15.67px;">
<td>
<asp:Button ID="btn_submitpw" runat="server" Text="Change the password!" OnClick="btn_submitpw_Click" Width="250px" style="margin-left:38px;border:none"/>
</td>
</tr>
<tr style="color:#003680;height:10px;">
<td>
<asp:RequiredFieldValidator ID="reqPasswtxt" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw_WH" ErrorMessage="Please repeat the password!" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
<td>
<asp:CompareValidator ID="confirmPasswordReq" style="margin-left:32px;" runat="server" ControlToCompare="txt_Pw" ControlToValidate="txt_Pw_WH" ErrorMessage="Please try again! The passwords didn't match." Display="Dynamic" ForeColor="Red"></asp:CompareValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw_WH" ValidationGroup="TXT_val" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ForeColor="Red" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="reqPassw1txt" runat="server" style="margin-left:32px;" ControlToValidate="txt_Pw" ErrorMessage="Please enter a password!" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw" ValidationGroup="TXT_val" ForeColor="Red" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH" style="margin-left:32px;" runat="server" ControlToValidate="txt_Pw_WH" ValidationGroup="TXT_val" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ForeColor="Red" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
</td>
</tr>
</table>
@@ -205,8 +214,13 @@
<span></span></td>
<td>
<asp:ImageButton ID="Image1_M" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="22px" Width="19px" style="margin-left:12px"/>
</td>
</tr >
</td>
</tr>
<tr style="height:15px">
<td>
<asp:RequiredFieldValidator ID="reqPassw1txt_M" runat="server" ControlToValidate="txt_Pw_M" ErrorMessage="Please enter the password!" ForeColor="Red" Font-Size="19" Display="Dynamic"></asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color:#003680;height:36.67px;">
<td>
<asp:TextBox id="txt_Pw_WH_M" CssClass="bg-key-icon" Width="245px" Font-Size="1.125em" ValidationGroup="TXT_val_WH_M" OnTextChanged="txt_Pw_WH_TextChanged" runat="server" TextMode="Password" Font-Names="Verdana" AutoCompleteType="Disabled" style="margin-left:22px;color:#003680" Placeholder="Repeat Password"></asp:TextBox>
@@ -215,20 +229,23 @@
<asp:ImageButton ID="Image2_M" runat="server" ImageUrl="~/images/Icons/service/hilfe.png" Height="22px" Width="19px" style="margin-left:12px;border:none;margin-top:15px" />
</td>
</tr>
<tr style="height:15px">
<td colspan="2">
<asp:RequiredFieldValidator ID="reqPasswtxt_M" runat="server" ControlToValidate="txt_Pw_WH_M" ErrorMessage="Please repeat the password!" Font-Size="19" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
</td>
</tr>
<tr style="color:#003680;height:26.67px;">
<td>
<asp:Button ID="btn_submitpw_M" runat="server" Text="Change the password!" OnClick="btn_submitpw_Click" Width="290px" style="margin-left:15px;border:none;height:40px;margin-top:1px"/>
</td>
</tr>
<tr style="color:#003680;height:20px;">
<td>
<asp:RequiredFieldValidator ID="reqPasswtxt_M" runat="server" ControlToValidate="txt_Pw_WH_M" ErrorMessage="Please repeat the password!" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="confirmPasswordReq_M" runat="server" ControlToCompare="txt_Pw_M" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" ForeColor="Red" ErrorMessage="Please try again! The passwords didn't match." Display="Dynamic"></asp:CompareValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH_M" runat="server" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" ForeColor="Red" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match teh criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="reqPassw1txt_M" runat="server" ControlToValidate="txt_Pw_M" ErrorMessage="Please enter a password!" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Pw_M" runat="server" ID="regexval_txt_Pw_M" ValidationGroup="TXT_val_M" ForeColor="Red" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match teh criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:Label ID="lbl_messagetext" runat="server" Text="Label"></asp:Label>
<td>
<asp:CompareValidator ID="confirmPasswordReq_M" runat="server" ControlToCompare="txt_Pw_M" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" Font-Size="19" ForeColor="Red" ErrorMessage="Please try again! The passwords didn't match." Display="Dynamic"></asp:CompareValidator>
<asp:RegularExpressionValidator ID="regexval_txt_Pw_WH_M" runat="server" ControlToValidate="txt_Pw_WH_M" ValidationGroup="TXT_val_WH_M" ForeColor="Red" Font-Size="19" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ControlToValidate="txt_Pw_M" runat="server" ID="regexval_txt_Pw_M" ValidationGroup="TXT_val_M" ForeColor="Red" Font-Size="19" ValidationExpression="^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z\d]).{4,35}$" Display="Dynamic" ErrorMessage="The Password has to match the criterias of the info-button." SetFocusOnError="true"></asp:RegularExpressionValidator>
<asp:Label ID="lbl_messagetext" runat="server" Text=""></asp:Label>
</td>
</tr>
</table>