validator-core

Fast, Lightweight, Flexible Validator.

Usage no npm install needed!

<script type="module">
  import validatorCore from 'https://cdn.skypack.dev/validator-core';
</script>

README

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