mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Remove unused conditions prop from revalidator test, add missing type and patternProperties fields (#34679)
This commit is contained in:
Vendored
+2
@@ -36,7 +36,9 @@ declare module Revalidator {
|
||||
}
|
||||
|
||||
interface JSONSchema<T> {
|
||||
type?: 'object';
|
||||
properties?: ISchemas<T>;
|
||||
patternProperties?: ISchemas<T>;
|
||||
}
|
||||
|
||||
interface ISchemas<T> {
|
||||
|
||||
@@ -35,12 +35,7 @@ revalidator.validate(someObject, {
|
||||
properties: {
|
||||
title: {
|
||||
type: 'string',
|
||||
maxLength: 140,
|
||||
conditions: {
|
||||
optional: function () {
|
||||
return !this.published;
|
||||
}
|
||||
}
|
||||
maxLength: 140
|
||||
},
|
||||
date: { type: 'string', format: 'date', messages: { format: "must be a valid %{expected} and nothing else" } },
|
||||
body: { type: 'string' },
|
||||
|
||||
Reference in New Issue
Block a user