@orion-js/schema
Advanced tools
Comparing version 3.6.1 to 3.6.5
@@ -12,3 +12,4 @@ declare const _default: { | ||
blackbox: import("..").FieldType; | ||
any: import("..").FieldType; | ||
}; | ||
export default _default; |
@@ -16,2 +16,3 @@ "use strict"; | ||
const blackbox_1 = __importDefault(require("./blackbox")); | ||
const any_1 = __importDefault(require("./any")); | ||
exports.default = { | ||
@@ -27,3 +28,4 @@ array: array_1.default, | ||
email: email_1.default, | ||
blackbox: blackbox_1.default | ||
blackbox: blackbox_1.default, | ||
any: any_1.default | ||
}; |
@@ -304,2 +304,11 @@ "use strict"; | ||
}); | ||
test('allow to set type any', async () => { | ||
const schema = { | ||
person: { | ||
type: 'any' | ||
} | ||
}; | ||
const errors = await (0, index_1.default)(schema, { person: { lastName: 'López' } }); | ||
expect(errors).toEqual(null); | ||
}); | ||
test('allow custom validation to pass an complex error object', async () => { | ||
@@ -306,0 +315,0 @@ const schema = { |
@@ -6,3 +6,3 @@ import { FieldType } from '../fieldType'; | ||
}; | ||
export type FieldTypesList = 'string' | 'date' | 'integer' | 'number' | 'ID' | 'boolean' | 'email' | 'blackbox'; | ||
export type FieldTypesList = 'string' | 'date' | 'integer' | 'number' | 'ID' | 'boolean' | 'email' | 'blackbox' | 'any'; | ||
export type TypedModelOnSchema = Function; | ||
@@ -9,0 +9,0 @@ export type ConstructorsTypesList = Constructor<String> | Constructor<Number> | Constructor<Boolean> | Constructor<Date>; |
{ | ||
"name": "@orion-js/schema", | ||
"version": "3.6.1", | ||
"version": "3.6.5", | ||
"main": "lib/index.js", | ||
@@ -34,3 +34,3 @@ "types": "lib/index.d.ts", | ||
}, | ||
"gitHead": "ce643e657e199d1893c8c0f1d067d96e542f1796" | ||
"gitHead": "1aa2e98c9e6cd7e82b19c335910d751ec2d2b03e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112825
124
3125