Set the validation state of a text input

Hey ! Thank you very much for your answer.
But i can’t get the “congratulation” text to appear when i write the word in the inputfield. It’s like it does not update…