Add validation for search