add form validation for register