cjkProtector jQuery plugin
Protect your inputs/textareas from Chinese, Japanese and Korean (CJK) characters.
Usage
;
Options
errorClass (string)
CSS class name added on input's wrapper div
element when CJK characters are found.
Default value is 'field_with_errors'
;
errorMessage (string)
Error message displayed when CJK characters are found.
Default value is 'Please use latin characters'
;
onError (function)
Called when CJK characters are found.
Default value is empty
;
onSuccess (function)
Called when CJK characters disappear.
Default value is empty
;
Running specs
First, you have to install all the project dependencies:
$ npm install
and then execute:
$ grunt test
Compile plugin
Just execute:
$ grunt build
This will generate two versions of the plugin in the dist
folder.