Update validate.js

Just a couple of little things that needed to be fixed, I did the same thing at first.