Skip to content

Rq-Rs Validation with support from array of Objects

Notifications You must be signed in to change notification settings

M-Sardari/Validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Rq-Rs Validation with support from array of Objects

install

$ 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

About

Rq-Rs Validation with support from array of Objects

Resources

Stars

Watchers

Forks