@kairat-kempirbaev
Posted
Hi Shiva,
Input field has many variations. Type can be email/password/text
There is a special pseudo class :invalid for this exact reason. If the typed text is not an Email this pseudo-class activates and you can put { border:red } for this pseudo-class
Hope it helps to solve a problem with the least amount of change to your existing code base.
Marked as helpful
@shivaprakash-sudo
Posted
@kairat-kempirbaev
Hello,
Thank you for replying and providing useful suggestions, but unfortunately the :invalid pseudo class didn't work properly the way I wanted. I've added a little bit of JS code to update the border accordingly.