Update validator.js

Added traditional form support + password match rule + refactored some event listeners.