I am trying to create a coupon code validation. My input block for the code turns green when the code typed in matches the valid ones in my data type “Coupon” list of valid codes.
It also checks for expiration date.
Then I would like the apply code button to appear based on the color of the input in the input code block. I do not want the Apply Code button to appear when the text input is read (unvalidated.)
How does one specify the color of a text block as a discriminator?
Should I do this some other way?