i still try in rails 3.2 to use bootstrap typeahead, it works fine, but how can i avoid users to type anything in text field.
I code looks like this
<%= text_field_tag(:text, "", :data => {:provide => "typeahead", :items=>"4", :source=>'["Swiss","German","English"]'}) %>
users may only type Swiss, German and English in the text field, but not for example Chinese.
How can i validate the value in text field?