Update validate.js

identity check