add form validation logic