diff --git a/package.json b/package.json index a0dbb5b..501f81f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@indec/form-builder", - "version": "1.7.1", + "version": "1.7.2", "description": "Form builder", "main": "index.js", "private": false, diff --git a/src/utils/buildYupSchema.js b/src/utils/buildYupSchema.js index 95cd492..ca9663b 100644 --- a/src/utils/buildYupSchema.js +++ b/src/utils/buildYupSchema.js @@ -56,7 +56,7 @@ const handleValidations = ({validator, validations, type, opts}) => { const newParams = []; const isCheckboxRequired = validationType === 'required' && type === questionTypes.CHECKBOX; validation.params.forEach(param => { - if (param.value || isCheckboxRequired) { + if (typeof param.value === 'number' || param.value || isCheckboxRequired) { newParams.push(isCheckboxRequired ? 1 : param.value, param.message); } else { newParams.push(param.message);