<script type="text/javascript"> function validate() { var mailid = document.getElementById('<%=txtmailid.ClientID%>').value; var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if (mailid == "") { alert("Please Enter Mail ID"); return false; } if (!reg.test(mailid)) { alert('Invalid Email Address'); return false; }
ValidationExpression="^[a-zA-Z'.\s]{1,40}$"
Login to post response