Basic validator to NodeJS