adding form validation to search