add form validation for log form