Skip to content

SME-FE/validator-core

Repository files navigation

SME Validator

Fast, Lightweight, Flexible Validator.

Only 2.7KB(after gzip) with 100% test coverage, yet powerful and extendable

Travis branch coverage download version license

Documentation

Installation an Usage

install

npm install --save validator-core

usage

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

loaded as a standalone script

<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