validation for search field