class-validator APIs
- IsString
- IsNotEmpty
- IsEmail
- IsOptional
- IsNumber
- IsEnum
- IsBoolean
- MinLength
- IsInt
- validate
- MaxLength
- IsArray
- Length
- ValidateNested
- Min
- IsDate
- Matches
- ValidationError
- Max
- IsUrl
- IsIn
- ValidationOptions
- ValidationArguments
- IsDefined
- registerDecorator
- IsObject
- ValidateIf
- ValidatorConstraint
- IsUUID
- ValidatorConstraintInterface
- IsPositive
- validateSync
- validateOrReject
- Validate
- Equals
- isArray
- IsAlphanumeric
- ArrayMinSize
- isString
- IsJSON
- IsMongoId
- IsDateString
- isUUID
- isISO8601
- IsBooleanString
- IsLongitude
- ArrayNotEmpty
- IsLatitude
- useContainer
- IsInstance
- IsAlpha
- isBoolean
- isDefined
- IsJWT
- IsSemVer
- MetadataStorage
- ValidateBy
- getFromContainer
- Allow
- ArrayUnique
- IsLowercase
- IsIP
- ArrayMaxSize
- IsISO31661Alpha3
- IsPhoneNumber
- IsHash
- IsNegative
- IsDecimal
- IsNumberString
- IsNotIn
- IsEmpty
- matches
- isMongoId
- MinDate
- IsRFC3339
- Validator
- ValidatePromise
- IsISO8601
- isNotEmpty
- isEmpty
- IsMobilePhone
- NotContains
- isNumber
- IsHexColor
- isObject
Other Related APIs
- class-validator#IsNotEmpty
- class-validator#Length
- class-validator#IsString
- class-validator#IsNumber
- class-validator#IsEmail
- class-validator#IsBoolean
- class-validator#IsOptional
- class-validator#IsInt
- class-validator#IsArray
- class-validator#Max
- class-validator#IsEnum
- class-validator#IsUrl
- class-validator#ValidateNested
- class-validator#MinLength
- class-validator#Matches
- class-validator#IsObject
- class-validator#Min
- net#ListenOptions
- class-transformer#ClassConstructor
- class-transformer#Type
- https#ServerOptions
class-validator#ArrayNotEmpty TypeScript Examples
The following examples show how to use
class-validator#ArrayNotEmpty.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: classes.ts From epicgames-freegames-node with MIT License | 5 votes |
/**
* A list of accounts to work with
*/
@IsArray()
@ValidateNested({ each: true })
@ArrayNotEmpty()
@Type(() => AccountConfig)
accounts: AccountConfig[];
Example #2
Source File: user-create-input.dto.ts From nestjs-starter-rest-api with MIT License | 5 votes |
@ApiProperty()
@IsArray()
@ArrayNotEmpty()
@IsEnum(ROLE, { each: true })
roles: ROLE[];