Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (42 sloc) 1.86 KB

SME Validator

Fast, Lightweight, Flexible Validator.

Only 7KB(min ver) with 100% test coverage, yet powerful and extendable

Travis branch coverage download version license

文档

详细文档

安装和使用

安装

通过 npm

npm install --save validator-core

用法

const Validator = require('validator-core')
const validator = new Validator()
// or
import Validator from 'validator-core'
const validator = new Validator()

使用标签方式加载

<script src="https://unpkg.com/validator-core"></script>
<script type="text/javascript">
  const validator = new Validator()
  validator.test('hwenleung@gmail.com', 'email') // => true
</script>

Contributors

Thanks goes to these wonderful people (emoji key):


hwen

🤔 💻 🎨 📖 💡

License

MIT License

Copyright (c) 2017-present, hwen hwenleung@gmail.com