Update validator.js

fixed a bug on line 68