Text-conformant Text Field (Increases its size as user types) - How to?

hi all,

I’m trying to make an interactive text field that will expand in length (on one line) as the user enters text.

Next issue:
I need it to wait for the contents of the field to match some specified text before it gives some kind of “correct!” reaction such as gaining a light green outline or whatever.

So to reiterate: I need help with how to make an interactive one-line rectangular text field that expands as the user types (and shrinks as they remove text) while waiting for the text contents to match some other text. Most important for now is everything before the matching aspect.

I really wish there were some kind of interactive Haxe tutorial out there, like Codecademy-style or anything even remotely similar. Even a progressive set of beginner exercises would be great, as long as they take you from total noob right through to being able to do the above with ease.

Thanks!