nox-validation 1.1.9 → 1.2.0
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/validate.js +0 -6
- package/package.json +1 -1
package/lib/validate.js
CHANGED
|
@@ -704,8 +704,6 @@ const schema = {
|
|
|
704
704
|
};
|
|
705
705
|
|
|
706
706
|
const validate = (data) => {
|
|
707
|
-
data = JSON.parse(JSON.stringify(data))
|
|
708
|
-
|
|
709
707
|
if (!data?.language) {
|
|
710
708
|
data.language = constants.LANGUAGES.en;
|
|
711
709
|
}
|
|
@@ -727,10 +725,6 @@ const validate = (data) => {
|
|
|
727
725
|
onlyFormFields,
|
|
728
726
|
} = data;
|
|
729
727
|
|
|
730
|
-
// fields = JSON.parse(JSON.stringify(fields))
|
|
731
|
-
// relations = JSON.parse(JSON.stringify(relations))
|
|
732
|
-
// relationalFields = JSON.parse(JSON.stringify(relationalFields))
|
|
733
|
-
|
|
734
728
|
const error_messages = constants.LOCALE_MESSAGES[language] ?? constants.LOCALE_MESSAGES[constants.LANGUAGES.en];
|
|
735
729
|
|
|
736
730
|
let result = { status: true, errors: {}, data: formData };
|