Hi there, @mdburhan3… it may be possible (and from the looks of @viquarahmed07’s response, I guess it is), but I would question whether or not you should do it from a user experience perspective. Why not have some placeholder or help text that tells a user those characters are not allowed, and then if they do include one of those characters, validate it upon submission or even after the input’s value is changed. To validate the characters in real time and do something about it in real time seems like it could be jarring for the end user, but maybe I just don’t understand what you are trying to do here.
Hi @mikeloc Thanks for your response
What my client wants to achieve is something like input content type email validator
When user types email it will show red color borders immediately…
Ah, okay. It makes sense in the context of an email input because it’s clear why the borders are red when the input does not contain something that looks like an email address. In the case of some sort of name field, I think the user will be wondering why in the heck the borders are red. So, if it was me, I would validate when the input’s value is changed and show a message that makes it clear what the user did wrong. But that’s just my two cents, and again, just food for thought because at the end of the day, what the client wants is what the client wants.
@mikeloc Yes i agree (we are displaying the rule in placeholder)
I am not sure we might end up adding alert…
I just have to agree with what my client wants