Update validate.js

throw error "event is not defined" in Firefox using requirejs