string validation fix for true and false

This commit is contained in:
VLE2FE 2020-09-02 15:06:30 +02:00
parent 78093ce2ff
commit 1460b5c1e6

View File

@ -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();