Validation system in NodeJS