Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m-sardari/validator
Rq-Rs Validation with support from array of Objects
https://github.com/m-sardari/validator
Last synced: about 1 month ago
JSON representation
Rq-Rs Validation with support from array of Objects
- Host: GitHub
- URL: https://github.com/m-sardari/validator
- Owner: M-Sardari
- Created: 2021-04-19T11:54:47.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T11:32:24.000Z (over 3 years ago)
- Last Synced: 2024-11-10T20:24:56.991Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 64.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
# DescriptionRq-Rs Validation with support from array of Objects
## install
```bash
$ npm install gadin-validator
```
## usage### @Validator({ propName, required, type },isArray?)
Checks for a valid value of the given type.
@Validator({ title: 'عنوان', required: true|false, type: 'boolean' })
@Validator({ title: 'عنوان', required: true|false, type: 'date' })
@Validator({ title: 'عنوان', required: true|false, type: 'object' })
@Validator({ title: 'عنوان', required: true|false, type: 'number' })
@Validator({ title: 'عنوان', required: true|false, type: 'any' })
@Validator({ title: 'عنوان', required: true|false, type: 'string[]' })//If the type value is not entered, the 'string' is considered by default
@Validator({ title: 'عنوان', required: true|false })
//For array of Objects
@Validator({ title: 'عنوان', required: true|false, type: 'number' }, true)
## license
Author: Mohammad Sardari