ngx-json-ui
Version:
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
87 lines (86 loc) • 2.22 kB
TypeScript
export interface StringValidatorModel {
pattern?: string;
creditCard?: boolean;
hostname?: boolean;
alphanum?: boolean;
length?: number;
insensitive?: string[];
ip?: {
version: ('ipv4' | 'ipv6')[];
cidr: 'optional' | 'required' | 'forbidden';
};
domain?: {
allowFullyQualified?: boolean;
allowUnicode?: boolean;
minDomainSegments?: number;
maxDomainSegments?: number;
};
email?: {
allowFullyQualified?: boolean;
allowUnicode?: boolean;
minDomainSegments?: number;
maxDomainSegments?: number;
ignoreLength?: boolean;
multiple?: boolean;
separator?: string;
};
base64?: {
paddingRequired?: boolean;
};
case?: 'lower' | 'upper';
token?: boolean;
uri?: {
scheme?: ('http' | 'https')[];
};
dataUri?: boolean;
min?: number;
max?: number;
}
export interface NumberValidatorModel {
port?: boolean;
positive?: boolean;
multiple?: number;
negative?: boolean;
precision?: number;
less?: number;
greater?: number;
min?: number;
max?: number;
}
export interface DateValidatorModel {
less?: 'now' | string | Date;
greater?: 'now' | string | Date;
min?: 'now' | string | Date;
max?: 'now' | string | Date;
iso?: boolean;
timestamp?: 'javascript' | 'unix';
}
export interface BooleanValidatorModel {
falsy?: string;
truthy?: string;
sensitive?: boolean;
mustBe?: boolean;
}
export interface ObjectValidatorModel {
schema: SchemaValidatorBodyModel;
}
export interface ArrayValidatorModel {
items?: ValidatorBodyModel;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
}
export interface ValidatorBodyModel {
type: 'string' | 'number' | 'integer' | 'date' | 'boolean' | 'array' | 'object';
required?: boolean;
default?: any;
string?: StringValidatorModel;
number?: NumberValidatorModel;
date?: DateValidatorModel;
boolean?: BooleanValidatorModel;
object?: ObjectValidatorModel;
array?: ArrayValidatorModel;
}
export interface SchemaValidatorBodyModel {
[key: string]: ValidatorBodyModel;
}