Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.NET textbox and Regular expression
    primarykey
    data
    text
    <p>iam using regular expression in javascript function to validate email. iam calling javascriptfunction using asp.net custom validator. email validation is working. when i click the textbox the cursor is in the middle of the textbox. it's not moving to end of the text or beginning of the textbox, if the textbox is empty. do you have any idea about this error.</p> <pre><code>&lt;asp:TextBox ID="txt_piEmail" CssClass="txtbox" runat="server" Text=""&gt;&lt;/asp:TextBox&gt; &lt;asp:CustomValidator ID="custom_valPatientInfoEmail" Display="None" ErrorMessage="Email" runat="server" ControlToValidate="txt_piEmail" SetFocusOnError="true" ClientValidationFunction="validEmail"&gt; </code></pre> <p></p> <pre><code>.txtbox { font-size: 11px; height:15px; font-weight: normal; color: #333333; line-height: 18px; border: 1px solid #b8c6d1; </code></pre> <p>}</p> <pre><code> function validEmail(src, args) { args.IsValid = true; var email = document.getElementById("&lt;%=txt_piEmail.ClientID%&gt;"); var emailID = email.value; var message = ""; var list; if (emailID.indexOf(';') &gt; 0) list = emailID.split(';'); else list = emailID.split(','); for (y = 0; y &lt; list.length; y++) { if (trimString(list[y]) != '') if (echeck(trimString(list[y])) == false) { args.IsValid = false; } } } function trimString(str) { //str = this != window? this : str; return str.replace(/^\s+/g, '').replace(/\s+$/g, ''); } </code></pre> <p>i can use regularexpression validator. i don't have regular expression for regular expression validator. i wan to validate the email for the following format: 1. giri@hotmail.com - trailing space between the email id. 2.giri@hotmail.com - without trailing space </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload