nox-validation 1.3.3 → 1.3.5

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 +4 -0
  2. package/package.json +1 -1
package/lib/validate.js CHANGED
@@ -299,6 +299,7 @@ const validateMetaRules = (
299
299
  let fPath = node.key;
300
300
 
301
301
  if (fPath.includes("update.")) return;
302
+ if (fPath.includes("create.") && !isTranslationChild) return;
302
303
 
303
304
  const label = formatLabel(node.display_label);
304
305
  const message = error_messages.REQUIRED.replace("{field}", label);
@@ -974,6 +975,9 @@ const validate = (data) => {
974
975
  if (!data?.language) {
975
976
  data.language = constants.LANGUAGES.en;
976
977
  }
978
+ if (!data?.language_codes) {
979
+ data.language_codes = [];
980
+ }
977
981
  if (data.onlyFormFields === undefined) {
978
982
  data.onlyFormFields = false;
979
983
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {