Subject: | Re: isEmailAddress()
| Date: | Mon, 29 Jul 2019 08:26:41 -0500
| From: | Mark Bannister <markRemove@THISinjection-moldings.com>
| Newsgroups: | pnews.paradox-programming
|
As Steven said, most likely not. There are doctoral theses written on
checking for a valid email address. While it seems simple it can be
tricky. The best IMHO is the simplest; check for three parts joined by
@ and ".": "sometext" + @ + "somemoretext" +"." + "finaltext". There
can me mulitiple "." but only on "@".
This advmatch will validate most (I Think):
"^([^@]+)@([^@]+)(.[a-zA-Z]+)$"
It doesn't check for all invalid characters. It will allow some invalid
ones.
On 7/28/2019 4:14 AM, Kevin Baker wrote:
> Hi Everyone,
>
> Was looking into the undocumented methods this weekend and came across
> isEmailAddress. I did a search on the forms and didn't find any post on
> this method. I created a single button form to test this method and it
> works. Does anyone have any experience is using this? Think it's okay
> to use in production code?
>
>
> Here's the code on the button:
>
> var
> em string
> endvar
>
> em = "shcsbaker@gmail.com"
>
> if isEmailAddress(em) then
> msginfo("Message","Is valid.")
> else
> msginfo("Message","Not valid.")
> endif
>
> Thanks
> Kevin
|