nox-validation 1.6.4 → 1.6.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 +9 -7
  2. package/package.json +1 -1
package/lib/validate.js CHANGED
@@ -536,19 +536,21 @@ const validateMetaRules = (
536
536
  langPath = rebuildFullPath(node.value, node.key, (path) =>
537
537
  path.replace(/create\[0\]\./, `create[${index}].`)
538
538
  );
539
- transformedPath = rebuildFullPath(node.value, node.key, (path) =>
540
- path
541
- .replace(/create\[0\]\./, `create[${index}].`)
542
- .replace(/\[0\]\./, `[${lang}].`)
539
+ transformedPath = rebuildFullPath(
540
+ node.value,
541
+ node.key,
542
+ (path) => {
543
+ const newPath = path.replace(/\[0\]\./, `.${lang}.`);
544
+ return newPath;
545
+ }
543
546
  );
544
547
  } else {
545
548
  langPath = rebuildFullPath(node.value, node.key, (path) => {
546
549
  return path.replace(/create\./, `create[${index}].`);
547
550
  });
551
+
548
552
  transformedPath = rebuildFullPath(node.value, node.key, (path) =>
549
- path
550
- .replace(/create\./, `create[${index}].`)
551
- .replace(/\[0\]\./, `[${lang}].`)
553
+ path.replace(/\[0\]\./, `.${lang}.`)
552
554
  );
553
555
  }
554
556
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {