Don't want to allow additional characters to be typed in textbox using auto-complete

Don't want to allow additional characters to be typed in textbox using auto-complete

I would like user to be able to type and auto complete a string, however if that string is NOT in the list, I don't want to allow additional characters to be typed in textbox. So the auto complete would ideally block additional input if that input does not exist in the list.

How can I do it?