form validation and transitions