nox-validation 1.4.4 → 1.4.6

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.
Files changed (2) hide show
  1. package/lib/validate.js +3 -3
  2. package/package.json +1 -1
package/lib/validate.js CHANGED
@@ -432,10 +432,10 @@ const validateMetaRules = (
432
432
  if (exist) isAdded = true;
433
433
 
434
434
  langPath = fPath.replace("create[0].", `create[${index}].`);
435
- transformedPath = fPath.replace("create[0].", `create.${lang}.`);
435
+ transformedPath = fPath.replace("create[0].", `${lang}.`);
436
436
  } else {
437
437
  langPath = fPath.replace("create.", `create[${index}].`);
438
- transformedPath = fPath.replace("create.", `create.${lang}.`);
438
+ transformedPath = fPath.replace("create.", `${lang}.`);
439
439
  }
440
440
 
441
441
  if (!isAdded) buildError(langPath, transformedPath);
@@ -896,7 +896,7 @@ const validateField = (
896
896
  language_codes,
897
897
  existingForm
898
898
  ) => {
899
- if (onlyFormFields == true && (value === undefined || value === null)) return;
899
+ if (onlyFormFields == true && value === undefined) return;
900
900
 
901
901
  const { is_m2a_item } = field?.meta;
902
902
  const currentPath = fieldPath
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {