Relative Content

Tag Archive for expressvalidationexpress-validator

Not capable of checking a falsy value at the validation middleware

I’ve found a weird behavior when trying to check for a falsy value. I guess it is related to the parser across the HTTP. All values inserted (eg http://www.localhost:3000/knex/0) are converted into strings: falsy values like 0 or ” are converted into “0” and “”” respectively. Therefore, when trying to check for falsy values doesn’t raise an error.