add javascript validation for registration