You can do it using jQuery. Basically, you need to add a keyup function to both fields i.e. password and confirm password. It will notify you whether both the fields are the same or not.