diff --git a/CHANGELOG.md b/CHANGELOG.md index 90aaedff..9b41ec70 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 6.9.2 (master) +- deprecated `checkSVKValidationPlugin` + # 6.9.1 (master) - introduced `validate()` input types. - introduced `ValidateOptions` & `ValidateOptionsInterface` models. diff --git a/src/Validator.ts b/src/Validator.ts index 4a3ca836..595e9c28 100755 --- a/src/Validator.ts +++ b/src/Validator.ts @@ -40,7 +40,6 @@ export default class Validator implements ValidatorInterface { Object.assign(this.plugins, obj.plugins); this.initDrivers(); - this.checkSVKValidationPlugin(); } initDrivers(): void { @@ -171,11 +170,4 @@ export default class Validator implements ValidatorInterface { }) ); } - - checkSVKValidationPlugin(): void { - if (_.isNil(this.drivers.svk) && _.get(this.plugins, "svk.config.schema")) { - const name = this.form.name ? `Form: ${this.form.name}` : ""; - throw new Error(`The SVK validation schema is defined but no plugin provided (SVK). ${name}`); - } - } } diff --git a/src/models/ValidatorInterface.ts b/src/models/ValidatorInterface.ts index 95d417c8..113956db 100644 --- a/src/models/ValidatorInterface.ts +++ b/src/models/ValidatorInterface.ts @@ -23,7 +23,6 @@ export interface ValidatorInterface { validate(opt?: ValidateOptions, obj?: ValidateOptions): Promise; validateField(opt: ValidateOptionsInterface): void; validateRelatedFields(field: any, showErrors: boolean): void; - checkSVKValidationPlugin(): void; } export type ValidationPlugin = { @@ -47,7 +46,7 @@ export type ExtendPlugin = ({ validator, form }: { }) => void; export interface ValidationPluginConfig { - package: ValidationPackage; + package?: ValidationPackage; schema?: any; options?: any; extend?: ExtendPlugin;