nox-validation 1.3.2 → 1.3.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/validate.js +4 -0
- package/package.json +1 -1
package/lib/validate.js
CHANGED
|
@@ -275,6 +275,7 @@ const validateMetaRules = (
|
|
|
275
275
|
|
|
276
276
|
if (
|
|
277
277
|
!fieldValue &&
|
|
278
|
+
!field?.meta?.hidden &&
|
|
278
279
|
![
|
|
279
280
|
constants.interfaces.FILES,
|
|
280
281
|
constants.interfaces.FILE,
|
|
@@ -973,6 +974,9 @@ const validate = (data) => {
|
|
|
973
974
|
if (!data?.language) {
|
|
974
975
|
data.language = constants.LANGUAGES.en;
|
|
975
976
|
}
|
|
977
|
+
if (!data?.language_codes) {
|
|
978
|
+
data.language_codes = [];
|
|
979
|
+
}
|
|
976
980
|
if (data.onlyFormFields === undefined) {
|
|
977
981
|
data.onlyFormFields = false;
|
|
978
982
|
}
|