I have problem with detecting minimum words using jquery.validation.js. As i got a script for uses this on english:
jQuery.validator.addMethod('minWords', function(value, element, params) {
return !$(element).val() || $(element).val().match(/\b\w+\b/g).length >= params;
}, 'Please enter at least {0} words.');
This script NOT WORK on thai specific language. Can anybody help me?
Thanks
It’s work now. Thanks All
Finally, I counted the thai language without XRegxp, I’m modifying minWords plugin using the same method from jquery.wordcount.js. Here’s the complete modified script:
Here’s the regular expression: