I want validate this input box . If the value is +971, it should be consider as empty box. Is possible to validate using required field validator?
<input id="txtmobile" runat="server" dataformat ="+971 (ddd) ddd-dddd>
Hi SUJAYS,
Refer below code.
HTML
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript"> function Validate(value) { if (value == "+971") { alert('Not valid'); } } </script> </head> <body> <input id="txtmobile" runat="server" onchange="Validate(this.value);" /> </body> </html>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.