Thursday, June 1, 2017

Check Special Character Exists in String or Not JQUERY

HI all,

Please find the JQuery to check weather Given Special Character Exists in String or not

$(document).ready(function () {
    var charReg = /[ !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/;
    $('#firstNametxtId').keyup(function () {
        var isValid = false;
        var inputVal = $(this).val();
        if (inputVal != "") {
            if (charReg.test(inputVal)) {
                isValid = true;
            }
        } else {
           
        }
    });
});

No comments:

Post a Comment

Dataverse/MSCRM: Work with Masking Rule

  Introduction: In this blog, we will see how to work with Masking Rule in MSCRM or Dataverse. Issue : I don't want to show the Email va...