Add validation for search field