Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/realign/n-validator


https://github.com/realign/n-validator

Last synced: 8 days ago
JSON representation

Awesome Lists containing this project

README

        

# n-validator
[![codecov][codecov-image]][codecov-url]

[codecov-url]: https://codecov.io/gh/ReAlign/n-validator
[codecov-image]: https://codecov.io/gh/ReAlign/n-validator/branch/master/graph/badge.svg

## Validator

| Method | Description |
| --- | --- |
| isInt(str, [, options]) | check if the variable is an integer. |
| isFloat(str, [, options]) | check if the variable is a float. |
| isDate(str, [, options]) | check if the string is a date string. |
| isDateTime(str, [, options]) | check if the string is a date-time string. |
| isBoolean(val, [, options]) | check if the variable is a boolean. |
| isLength(str, [, options]) | check if the string's length falls in a range. ( [min, max] ) |
| isRequired(str) | check if the variable required. |

## todo

* [ ] isFloat, decimal digits(0.10: 2?1)
* [ ] number strictMode
* [ ] date stamp