nox-validation 1.0.2 → 1.0.4

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/lib/helpers.js CHANGED
@@ -192,6 +192,7 @@ const convertTypes = (field) => {
192
192
  constants.interfaces.ONE_TO_MANY,
193
193
  constants.interfaces.MANY_TO_MANY,
194
194
  constants.interfaces.MANY_TO_ANY,
195
+ constants.interfaces.MANY_TO_ONE,
195
196
  constants.interfaces.TRANSLATIONS,
196
197
  ].includes(interfaceType)
197
198
  ) {
package/lib/validate.js CHANGED
@@ -581,6 +581,7 @@ const validateField = (
581
581
  value[child.key.split(".").pop()],
582
582
  currentPath,
583
583
  addError,
584
+ formData,
584
585
  updateValue,
585
586
  error_messages
586
587
  )
@@ -614,6 +615,7 @@ const validateField = (
614
615
  item[child.key.split(".").pop()],
615
616
  `${currentPath}[${index}]`,
616
617
  addError,
618
+ formData,
617
619
  updateValue,
618
620
  error_messages
619
621
  )
@@ -680,6 +682,7 @@ const validate = (data) => {
680
682
  const error_messages =
681
683
  constants.LOCALE_MESSAGES[language] ?? constants.LOCALE_MESSAGES[defaultLanguage];
682
684
 
685
+
683
686
  let result = { status: true, errors: {}, data: formData };
684
687
 
685
688
  const updateValue = (key, value) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {