Fix bug in advanced search field validation