I'm trying to call the CKEDITOR textarea in JQuery but it doesn't response

Viewed 23

here i'm using jsp code to declere the textarea ---

                        <td colspan="3"><form:textarea path="purpose"  class="tx-area-large 
    noSpecialChar" required="required"></form:textarea></td>

enter image description here

javascript code---

function CommantValidation() {
 $('input, textarea').each(function(index, element) {
    $(element).keyup(function() {
    var inputVal = $(element).val();
        var characterReg =/^[ A-Za-z 0-9*#_ ./-]*$/;
        if(!characterReg.test(inputVal)) {
            errorMessage="special characters not allowed !!!";
            showContainer(errorMessage);
            return false;
            
            }else{
           hideContainer();
           return true;}
     });    
     
        

}); }

0 Answers
Related