Properties
Optional
contains
contains?: string | {
msg: string;
}
Optional
equals
equals?: string | {
msg: string;
}
Optional
is
is?: string | RegExp | readonly (string | RegExp)[] | {
args: string | RegExp | readonly (string | RegExp)[];
msg: string;
}
Optional
isAfter
isAfter?: string | {
args: string;
msg: string;
}
Optional
isAlpha
isAlpha?: boolean | {
msg: string;
}
Optional
isAlphanumeric
isAlphanumeric?: boolean | {
msg: string;
}
Optional
isArray
isArray?: boolean | {
args: boolean;
msg: string;
}
Optional
isBefore
isBefore?: string | {
args: string;
msg: string;
}
Optional
isCreditCard
isCreditCard?: boolean | {
args: boolean;
msg: string;
}
Optional
isDate
isDate?: boolean | {
args: boolean;
msg: string;
}
Optional
isDecimal
isDecimal?: boolean | {
msg: string;
}
Optional
isEmail
isEmail?: boolean | {
msg: string;
}
Optional
isFloat
isFloat?: boolean | {
msg: string;
}
Optional
isIP
isIP?: boolean | {
msg: string;
}
Optional
isIPv4
isIPv4?: boolean | {
msg: string;
}
Optional
isIPv6
isIPv6?: boolean | {
msg: string;
}
Optional
isIn
isIn?: readonly (readonly any[])[] | {
args: readonly (readonly any[])[];
msg: string;
}
Optional
isInt
isInt?: boolean | {
msg: string;
}
Optional
isLowercase
isLowercase?: boolean | {
msg: string;
}
Optional
isNull
isNull?: boolean | {
msg: string;
}
Optional
isNumeric
isNumeric?: boolean | {
msg: string;
}
Optional
isUUID
isUUID?: number | {
args: number;
msg: string;
}
Optional
isUppercase
isUppercase?: boolean | {
msg: string;
}
Optional
isUrl
isUrl?: boolean | {
msg: string;
}
Optional
len
len?: readonly [number, number] | {
args: readonly [number, number];
msg: string;
}
Optional
max
max?: number | {
args: readonly [number];
msg: string;
}
Optional
min
min?: number | {
args: readonly [number];
msg: string;
}
Optional
not
not?: string | RegExp | readonly (string | RegExp)[] | {
args: string | RegExp | readonly (string | RegExp)[];
msg: string;
}
Optional
notContains
notContains?: string | readonly string[] | {
args: string | readonly string[];
msg: string;
}
Optional
notEmpty
notEmpty?: boolean | {
msg: string;
}
Optional
notIn
notIn?: readonly (readonly any[])[] | {
args: readonly (readonly any[])[];
msg: string;
}
Optional
notNull
notNull?: boolean | {
msg: string;
}
Model validations, allow you to specify format/content/inheritance validations for each attribute of the model.
Validations are automatically run on create, update and save. You can also call validate() to manually validate an instance.
The validations are implemented by validator.js.