property - name of the object's property being validatedValidating arraysIf your field is an array and you want to perform validation of each item in the array you must specify a special each: true decorator option:import { MinLength, MaxLength } from 'class-validator'; export class Post {...
@IsNotIn(values: any[]) Checks if value is not in a array of disallowed values. 检查值是否不在不允许的值数组中 类型验证装饰器 修饰器描述(英文)描述(中文) @IsBoolean() Checks if a value is a boolean. 是否为布尔值 @IsDate() Checks if the value is a date. 是否为日期 @IsString()...
import { MinLength, MaxLength } from 'class-validator'; export class Post { @MaxLength(20, { each: true, }) tags: string[]; }This will validate each item in post.tags array.Validating setsIf your field is a set and you want to perform validation of each item in the set you must ...
additionalChildren List of datasets to add to a workspace schemaSchema object properties Use FirstDependency Several of the rules can be set to "FirstDependency", which means the value of the first parameter found in the parameter dependency array set will be used with parameter.parameterDependencies...
Validation decorators of class-validator Common# Type# Number# Date# String-type# String# Array# Object# Other#
Foreign_key_parents_invalidator, GenericPolicy< Mutex >, Group_member_info_manager, Group_member_info_manager_interface, helper::json::SerializerToText::Array, http::base::Headers, http::base::IOBuffer, ib_counter_t< Type, N, Indexer >, Item_cond, Item_first_last_value, Item_func_group...
The RegularExpressionValidator control checks whether the value of an input control matches a pattern defined by a regular expression. This type of validation allows you to check for predictable sequences of characters, such as those in email addresses, telephone numbers, and postal codes....
Returns an array of capturing group numbers that correspond to group names in an array. GetHashCode() Serves as the default hash function. (Inherited fromObject) GetType() Gets theTypeof the current instance. (Inherited fromObject) GroupNameFromNumber(Int32) ...
Several of the rules can be set to "FirstDependency", which means the value of the first parameter found in the parameter dependency array set will be used withparameter.parameterDependencies. In the code example below, parameter 2 has two dependent parameters, 0 and 1, and the first dependen...
@IsNotIn(values: any[])Checks if value is not in a array of disallowed values.检查值是否不在不允许的值数组中 类型验证装饰器 修饰器描述(英⽂)描述(中⽂)@IsBoolean()Checks if a value is a boolean.是否为布尔值 @IsDate()Checks if the value is a date.是否为⽇期 @IsString()...