Slight modifications to reg.js to make validatePass work with HTML