1 of 1 people found this helpful
Can you validate names againt those patterns? Yes. The Forms JS API (see the docs) allows you to validate using any criteria you want. There are many examples in the Community (including several I've contributed against my better judgment!).
Should you? No. Those constraints don't model the real world. "test" is a valid part of a name. So is "abc." So, most certainly, are periods and hyphens. "test" and "other" are perfectly valid character sequences on either side of an email address. http://gamil.com happens to be a lame design site, but it's not nonexistent and surely has some valid mailboxes.
Based on these examples, it doesn't seem like you thought this through. Invalid proper nouns are very, very difficult to catch without abundant false positives, and randomly assigned and/or purposely opaque email addresses can contain seemingly "nonsensical" sequences but still be totally valid for receiving mail. And even when you're right about something being invalid, you're giving them another chance: stop me from entering "abc" as my entire first name and I'll just type "Joe."
That said, machine learning can help you out: there are services you could call from your form (not a few simple lines of code but a remote web service) that perform with higher accuracy, though still with false positives (i.e. lost leads).
But I think your energy would be better spent on ensuring that somebody entered an emailable email address (using a web service designed for this purpose) rather than falsely telling people they mistyped. You may also want to drop addresses that do exist, but are @ one of the 100s of free/disposable email provders.
Thank You Sanford for a great help. ,
It is really helped me and understanding the concept of it. Let me try an alternative way of avoid them by trigger to make them unqualified.
Wish you Merry Christmas and Happy New year 2017.