-
Less than 10KB
-
No dependencies
-
Customizable rules messages and styles
-
Support bootstrap and semantic
-
Useable RegExp on html
- Simplest demo
<input type="text" data-rule="required">
<script>
new SMValidator('input');
</script>
-
Support third-party UI framework
bootstrap demo | semantic demo |
-
Use npm
npm install --save sm-validator
-
Use bower
bower install sm-validator
-
SMValidator.js
source with config -
SMValidator.min.js
the minify for SMValidator -
SMValidator.pure.min.js
without config, set rule and style by yourself
-
详细的API说明
-
测试用例及浏览器兼容测试
-
英文文档
-
添加vue、jquery插件版本
some inspirations comes from: nice-validator