How to get required validation working on ejRTE ?

Hi,
I can't get the required validation working for ejRTE, what I miss ?

My test : http://jsplayground.syncfusion.com/ks3kjbki


Thank you


1 Reply

IB Ilakkiya Baskar Syncfusion Team April 25, 2018 05:46 AM UTC

Hi Fabrice BM Raud,  
   
Thank you for contacting Syncfusion Support.   
  
We suggest you to add jquery.validate.min.js file in the sample and add the below mentioned methods to validate. Please refer to the code block.   
$.validator.setDefaults({   
        ignore: [],   
        errorClass: 'e-validation-error'// to get the error message on jQuery validation   
        errorPlacement: function (error, element) {   
            $(error).insertAfter(element.closest(".e-widget"));   
        }   
        // any other default options and/or rules   
    });   
    //If necessary, we can create custom rules as below. here method defined for min   
    $.validator.addMethod("min",   
        function (value, element, params) {   
            if (!/Invalid|NaN/.test(value)) {   
                return parseInt(value) > params;   
            }   
        }, 'Must be greater than 30.');   
Please refer to the below link for more information,   
   
Please refer to the sample in the below link,   
   
Let us know if there is any concern, we will be happy to assist you.    
  
Regards,   
Ilakkiya B   


Loader.
Up arrow icon