mobx-react-form
Advanced tools
Comparing version 6.9.4 to 6.10.0
@@ -6,2 +6,6 @@ import Form from "../Form"; | ||
import { StateInterface } from "./StateInterface"; | ||
export interface ValidatorConstructor { | ||
form: FormInterface; | ||
plugins: ValidationPlugins; | ||
} | ||
export interface ValidateOptionsInterface { | ||
@@ -35,2 +39,3 @@ showErrors?: boolean; | ||
zod?: ValidationPlugin; | ||
joi?: ValidationPlugin; | ||
} | ||
@@ -37,0 +42,0 @@ export type ValidationPackage = any; |
@@ -1,2 +0,2 @@ | ||
import ValidatorInterface, { DriversMap, ValidateOptions, ValidationPlugins } from "./models/ValidatorInterface"; | ||
import ValidatorInterface, { DriversMap, ValidateOptions, ValidationPlugins, ValidatorConstructor } from "./models/ValidatorInterface"; | ||
import { FormInterface } from "./models/FormInterface"; | ||
@@ -10,3 +10,3 @@ import { FieldInterface } from "./models/FieldInterface"; | ||
error: string | null; | ||
constructor(obj?: any); | ||
constructor(obj: ValidatorConstructor); | ||
initDrivers(): void; | ||
@@ -13,0 +13,0 @@ validate(opt: ValidateOptions, obj: ValidateOptions): Promise<any>; |
@@ -11,3 +11,3 @@ "use strict"; | ||
class Validator { | ||
constructor(obj = {}) { | ||
constructor(obj) { | ||
Object.defineProperty(this, "promises", { | ||
@@ -41,2 +41,3 @@ enumerable: true, | ||
zod: undefined, | ||
joi: undefined, | ||
} | ||
@@ -43,0 +44,0 @@ }); |
{ | ||
"name": "mobx-react-form", | ||
"license": "MIT", | ||
"version": "6.9.4", | ||
"version": "6.10.0", | ||
"author": "Claudio Savino <claudio.savino@me.com> (https://twitter.com/foxhound87)", | ||
"description": "Automagically manage React forms state and automatic validation with MobX.", | ||
"description": "Reactive MobX Form State Management", | ||
"homepage": "https://github.com/foxhound87/mobx-react-form#readme", | ||
@@ -98,2 +98,3 @@ "main": "./lib/index.js", | ||
"husky": "0.13.1", | ||
"joi": "^17.13.3", | ||
"json-loader": "0.5.4", | ||
@@ -100,0 +101,0 @@ "lodash-webpack-plugin": "^0.11.6", |
@@ -7,2 +7,7 @@ import Form from "../Form"; | ||
export interface ValidatorConstructor { | ||
form: FormInterface; | ||
plugins: ValidationPlugins; | ||
} | ||
export interface ValidateOptionsInterface { | ||
@@ -40,2 +45,3 @@ showErrors?: boolean, | ||
zod?: ValidationPlugin; | ||
joi?: ValidationPlugin; | ||
} | ||
@@ -80,2 +86,3 @@ | ||
export default ValidatorInterface; |
@@ -10,2 +10,3 @@ import { action, observable, makeObservable } from "mobx"; | ||
ValidationPlugins, | ||
ValidatorConstructor, | ||
} from "./models/ValidatorInterface"; | ||
@@ -29,2 +30,3 @@ import { FormInterface } from "./models/FormInterface"; | ||
zod: undefined, | ||
joi: undefined, | ||
}; | ||
@@ -34,3 +36,3 @@ | ||
constructor(obj: any = {}) { | ||
constructor(obj: ValidatorConstructor) { | ||
makeObservable(this, { | ||
@@ -37,0 +39,0 @@ error: observable, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1241141
191
14305
35