Update validate.js to fix jsHint errors.