Added form validation for registration form