sm-validator

1.0.0 • Public • Published

sm-validator(small form validator)

Features

  • Less than 10KB

  • No dependencies

  • Customizable rules messages and styles

  • Support bootstrap and semantic

  • Useable RegExp on html

Demos

  • Simplest demo
<input type="text" data-rule="required">
<script>
  new SMValidator('input');
</script>
bootstrap demo semantic demo

Download

  • From Github

  • Use npm npm install --save sm-validator

  • Use bower bower install sm-validator

Documents

Quick Start

About dist

  • SMValidator.js source with config

  • SMValidator.min.js the minify for SMValidator

  • SMValidator.pure.min.js without config, set rule and style by yourself

TODO

  1. 详细的API说明

  2. 测试用例及浏览器兼容测试

  3. 英文文档

  4. 添加vue、jquery插件版本

Reference

some inspirations comes from: nice-validator

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.01
0.12.01
0.11.20
0.10.10
0.9.60

Package Sidebar

Install

npm i sm-validator

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • cwloog