Email Validation
Posted: Thu Jan 21, 2016 12:56 am
Is there anyway in LiveCode to validate an email that is entered into a field?
Thanks.
Thanks.
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
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