backport autocomplete from 3.1 - fixes issue where none-matched search text was being submitted - meant notempty validation wouldnt fail