not-node 5.0.7 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "5.0.7",
3
+ "version": "5.0.8",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/form/form.js CHANGED
@@ -4,10 +4,6 @@ const {
4
4
  createSchemaFromFields
5
5
  } = require('../fields');
6
6
 
7
- const {
8
- byFieldsValidators
9
- } = require('../model/enrich');
10
-
11
7
  const {objHas} = require('../common');
12
8
 
13
9
  const ValidationBuilder = require('not-validation').Builder;
@@ -154,9 +150,7 @@ class Form {
154
150
  }
155
151
 
156
152
  #createModelSchema(app){
157
- return byFieldsValidators(
158
- createSchemaFromFields(app, this.#PROTO_FIELDS, 'model', this.#FORM_NAME)
159
- );
153
+ return createSchemaFromFields(app, this.#PROTO_FIELDS, 'model', this.#FORM_NAME);
160
154
  }
161
155
 
162
156
 
@@ -173,7 +167,6 @@ class Form {
173
167
  this.#SCHEMA = ValidationBuilder(this.#SCHEMA, this.getValidatorEnvGetter());
174
168
  }
175
169
 
176
-
177
170
  /**
178
171
  * Validates form data or throws
179
172
  * @param {Object} data form data
@@ -7,7 +7,7 @@ function extractValidationEnvGetter(options){
7
7
  return options.getValidationEnv;
8
8
  }else{
9
9
  //should return at least empty object
10
- return ()=>{return {};};
10
+ return ()=>{return {validate};};
11
11
  }
12
12
  }
13
13