aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/schemas/validator.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/schemas/validator.ts')
-rw-r--r--packages/website/ts/schemas/validator.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
index a3aaafc98..5177501c6 100644
--- a/packages/website/ts/schemas/validator.ts
+++ b/packages/website/ts/schemas/validator.ts
@@ -5,15 +5,15 @@ import { signatureDataSchema } from 'ts/schemas/signature_data_schema';
import { tokenSchema } from 'ts/schemas/token_schema';
export class SchemaValidator {
- private _validator: Validator;
- constructor() {
- this._validator = new Validator();
- this._validator.addSchema(signatureDataSchema as JSONSchema, signatureDataSchema.id);
- this._validator.addSchema(tokenSchema as JSONSchema, tokenSchema.id);
- this._validator.addSchema(orderTakerSchema as JSONSchema, orderTakerSchema.id);
- this._validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
- }
- public validate(instance: object, schema: Schema) {
- return this._validator.validate(instance, schema);
- }
+ private _validator: Validator;
+ constructor() {
+ this._validator = new Validator();
+ this._validator.addSchema(signatureDataSchema as JSONSchema, signatureDataSchema.id);
+ this._validator.addSchema(tokenSchema as JSONSchema, tokenSchema.id);
+ this._validator.addSchema(orderTakerSchema as JSONSchema, orderTakerSchema.id);
+ this._validator.addSchema(orderSchema as JSONSchema, orderSchema.id);
+ }
+ public validate(instance: object, schema: Schema) {
+ return this._validator.validate(instance, schema);
+ }
}