Updated error interface from simple strings.

This commit is contained in:
Jason Turner
2016-04-04 14:41:09 +10:00
parent 2a6fd2e666
commit 9a474d26f5
+7 -2
View File
@@ -8,9 +8,14 @@ declare module Revalidator {
validate(object: any, schema: ISchema, options: any): IReturnMessage;
}
interface IErrrorProperty {
property: string;
message: string;
}
interface IReturnMessage {
valid: boolean;
errors: string[];
errors: IErrrorProperty[];
}
interface ISchema {
@@ -40,4 +45,4 @@ declare var revalidator: Revalidator.RevalidatorStatic;
declare module "revalidator" {
export = revalidator;
}
}