add form validation to todo form