From 1460b5c1e65dead975954ed0b384a395e8c3af45 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Wed, 2 Sep 2020 15:06:30 +0200 Subject: [PATCH] string validation fix for true and false --- src/app/services/validation.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/validation.service.ts b/src/app/services/validation.service.ts index bcefafa..3031ea8 100644 --- a/src/app/services/validation.service.ts +++ b/src/app/services/validation.service.ts @@ -50,7 +50,7 @@ export class ValidationService { } string(data, option = null) { - let validator = Joi.string().max(128).allow(''); + let validator = Joi.string().max(128).allow('', true, false); let errorMsg = 'must contain max 128 characters'; if (option === 'alphanum') { validator = validator.alphanum();