Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/katsew/minimal-validator
minimal validator for node.
https://github.com/katsew/minimal-validator
Last synced: 14 days ago
JSON representation
minimal validator for node.
- Host: GitHub
- URL: https://github.com/katsew/minimal-validator
- Owner: katsew
- Created: 2015-12-07T15:16:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-08T09:47:37.000Z (about 9 years ago)
- Last Synced: 2024-04-15T00:45:08.032Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Circle CI](https://circleci.com/gh/katsew/minimal-validator.svg?style=svg)](https://circleci.com/gh/katsew/minimal-validator)
# Minimal validator for Nodejs and Browser
This is a sample validator for sever/client JavaScript.
It includes html, password, mail validator.# Usage
Please use with `require`, or `import` with Babel.
```
const validator = require('minimal-validator');
// If you do not give a RegExp argument, default RegExp applied.
const mailValidator = new validator.mail(/mail\@email\.com/);mailValidator.validate("test") === false;
mailValidator.validate("[email protected]") === true;```