From f0b4b6bac1f005a954c0a28890a4390295d75685 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Mon, 24 Jul 2017 13:13:18 -0700 Subject: [PATCH] Add minimal backstop for #3414 --- src/core/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/utils.js b/src/core/utils.js index f2e28948..466f479f 100644 --- a/src/core/utils.js +++ b/src/core/utils.js @@ -479,8 +479,9 @@ export const validateParam = (param, isXml) => { let arrayCheck = type === "array" && Array.isArray(value) && !value.length let listCheck = type === "array" && Im.List.isList(value) && !value.count() let fileCheck = type === "file" && !(value instanceof win.File) + let nullUndefinedCheck = value === null || value === undefined - if ( required && (stringCheck || arrayCheck || listCheck || fileCheck) ) { + if ( required && (stringCheck || arrayCheck || listCheck || fileCheck || nullUndefinedCheck) ) { errors.push("Required field is not provided") return errors }