javascript - RegEx Errors Not Displaying -
i have several text boxes in row on table , i'm not able see error message due this, @ present star (*) displaying isn't helpful end user.
any ideas/solutions/fixes problem?
below aspx code:
<asp:textbox id="name" runat="server" text='<%#bind("name") %>'></asp:textbox> <asp:requiredfieldvalidator id="fieldvalidator" runat="server" controltovalidate="name" validationgroup="vg" setfocusonerror="true">*</asp:requiredfieldvalidator> <asp:regularexpressionvalidator id="regname" runat="server" controltovalidate="name" errormessage="* required, no more 20 characters allowed." validationgroup="vg" validationexpression="^[a-za-z''-'\s]{1,20}$">*</asp:regularexpressionvalidator>
set validation summary on page , display error message. don't put between them instead of * it'll set boxes miles apart blank space until error called.
here's code tested on chrome put alert box user can't miss , don't have fiddle whatever you're working on accommodate summary:
<asp:regularexpressionvalidator id="regularexpressionvalidator1" runat="server" errormessage="you may enter maxium of twenty characters." controltovalidate="txtbx2" validationexpression="^[\s\s]{0,20}$" display="none"/> <asp:validationsummary id="validationsummary1" runat="server" showmessagebox="true" showsummary="false"/>
Comments
Post a Comment