How to setup conditions to validate the input with containg a text?