mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
@@ -0,0 +1,3 @@
|
||||
/// <reference path="./revalidator.d.ts" />
|
||||
|
||||
revalidator.validate(null, null, null);
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
// Type definitions for revalidator 0.3.1
|
||||
// Project: https://github.com/flatiron/revalidator
|
||||
// Definitions by: Jason Turner <https://github.com/brewsoftware>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module Revalidator {
|
||||
interface RevalidatorStatic {
|
||||
validate(object: any, schema: ISchema, options: any): IReturnMessage;
|
||||
}
|
||||
|
||||
interface IErrrorProperty {
|
||||
property: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface IReturnMessage {
|
||||
valid: boolean;
|
||||
errors: IErrrorProperty[];
|
||||
}
|
||||
|
||||
interface ISchema {
|
||||
required?: boolean;
|
||||
type: string;
|
||||
pattern?: any;
|
||||
maxLength?: number;
|
||||
minLength?: number;
|
||||
minimum?: number;
|
||||
maximum?: number;
|
||||
allowEmpty: boolean;
|
||||
exclusiveMinimum: number;
|
||||
exclusiveMaximum?: number;
|
||||
divisibleBy?: number;
|
||||
minItems?: number;
|
||||
maxItems?: number;
|
||||
uniqueItems?: boolean;
|
||||
enum?: any;
|
||||
format?: string;
|
||||
conform?: (data:any) => boolean;
|
||||
depdendencies?: string;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
declare var revalidator: Revalidator.RevalidatorStatic;
|
||||
|
||||
declare module "revalidator" {
|
||||
export = revalidator;
|
||||
}
|
||||
Reference in New Issue
Block a user