diff --git a/src/@episerver/forms-sdk/src/form-validator/formValidator.ts b/src/@episerver/forms-sdk/src/form-validator/formValidator.ts index 002130b..64c6f0f 100644 --- a/src/@episerver/forms-sdk/src/form-validator/formValidator.ts +++ b/src/@episerver/forms-sdk/src/form-validator/formValidator.ts @@ -25,7 +25,9 @@ export class FormValidator { * @returns True or false */ validateRequired(value: any): boolean{ - if (isNullOrEmpty(value) + if (isNull(value) + //for text, textarea + || (typeof value === "string" && isNullOrEmpty(value.trim())) // for FileUpload element || (value instanceof Array && value.length === 0)) { return false;