Skip to main content

Posts

Showing posts with the label JavaScript Special Characters Validation example

JavaScript/jQuery Special Characters Validation example

Hello everyone, I am going to share the special characters validation using JavaScript/jQuery. The input special characters   !@#$%^&*()_+~{}[]';:"/.,< >? Example as given below $( function () {    $( "form :input[type='text']" ).on( "keyup" , function (e) {         var inputTextId = $( '#' + this .id);         var inputText = inputTextId.val();         var errorFor = this .id ;         if (!isValidChar(inputText)) {             $( '#' + this .id).val( '' ).valid();                     setTimeout( function () { replaceErrorMsg(errorFor); }, 100);         }      });   });   fu...