NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: CaseyR on September 27, 2013, 11:52:53 AM
-
Email is a critical part of our application. Is there any function that validates an email address? I have simple tests like includes an @ and has a period after it, but wondered if there was anything more comprehensive. Even better, a way to confirm the address is actually working.
Any suggestions, greatly appreciated. Thanks.
-
Casey, in a form i set a local variable to loc:eMailFrom (entry field) and in embed point Validate All the following code
X# = MATCH(UPPER(CLIP(loc:eMailFrom)),|
'^[-A-Z0-9._]+@{{[-A-Z0-9._]+\.}+[A-Z][A-Z][A-Z]?[A-Z]?$', Match:Regular)
IF X# <> 1
loc:invalid = 'loc:eMailFrom'
p_web.SetValue('retry','EmailFormControl')
loc:Alert = 'Invalid eMail.'
ELSE
!Procedure to send the eMail
SendEmail(eMailParams)
END!If
-
Thanks, urayoan, I will give it a shot.
-
Also since String Theory is now required by NTalk you could use it to do the same checking