Is there anyway in LiveCode to validate an email that is entered into a field?
Thanks.
Email Validation
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Email Validation
Here, I found this function somewhere a long time ago;
Thank you to whoever wrote it 
Simon
Code: Select all
function isEmail pWhat
put matchtext(pWhat,"^[A-z0-9_\-\.]+[@][A-z0-9_\-]+([.][A-z0-9_\-]+)+[A-z]$") into tNotIP
put matchtext(pWhat,"^(1*\d{1,2}|2[0-4]\d|25[0-5])\.(1*\d{1,2}|2[0-4]\d|25[0-5])\.(1*\d{1,2}|2[04]\d|25[0-5])\.(1*\d{1,2}|2[0-4]\d|25[0-5])(:\d{1,5})*$") into tIsIP
return (tIsIP or tNotIP)
end isEmail

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!