vulcain-corejs
Version:
Vulcain micro-service framework
104 lines (103 loc) • 2.39 kB
TypeScript
export declare class SchemaStandardTypes {
static "T_string": string;
static "T_any": string;
static "T_boolean": string;
static "T_number": string;
static "T_integer": string;
static "T_enum": string;
static "T_uid": string;
static "T_arrayOf": string;
static "T_range": string;
static "T_email": string;
static "T_url": string;
static "T_alphanumeric": string;
static "T_date-iso8601": string;
}
export declare class SchemaStandardValidators {
static "V_pattern": string;
static "V_length": string;
}
export declare let standards: {
"$ref": {
$cardinality: string;
$item: any;
messages: string[];
validate: (val: any) => any;
};
"string": {
message: string;
validate: (val: any) => any;
};
"pattern": {
$pattern: any;
message: string;
validate: (val: any) => any;
};
"number": {
message: string;
bind: (val: any) => any;
validate: (val: any) => any;
};
"length": {
type: string;
$min: any;
$max: any;
messages: string[];
validate: (val: any) => any;
};
"integer": {
message: string;
bind: (val: any) => any;
validate: (val: any) => any;
};
"boolean": {
message: string;
bind: (val: any) => any;
validate: (val: any) => any;
};
"enum": {
type: string;
$values: any[];
message: string;
validate: (val: any) => any;
};
uid: {
type: string;
bind: (v: any) => any;
};
"arrayOf": {
$item: string;
messages: string[];
validate: (val: any) => any;
};
range: {
type: string;
$min: number;
$max: number;
message: string;
validate: (val: any) => any;
};
email: {
message: string;
validate: (val: any) => any;
};
url: {
type: string;
message: string;
validate: (val: any) => any;
};
alphanumeric: {
type: string;
message: string;
validate: (val: any, ctx?: {
locale: string;
}) => any;
};
'date-iso8601': {
type: string;
message: string;
validate: (val: any, ctx?: {
locale: string;
}) => any;
};
};