IsValidMail

From Multi Theft Auto: Wiki
Revision as of 10:32, 20 July 2014 by Justin Roth (talk | contribs)
Jump to navigation Jump to search


This function allows you to check e-mails, if they are in the correct format.

Syntax

bool isValidMail ( string mail )

Returns

Returns true when the email was valid, false when the email was invalid

Code

<section name="Clientside and Serverside Script" class="server" show="true">

function isValidMail(mail) 

	return mail:match("[A-Za-z0-9%.%%%+%-]+@[A-Za-z0-9%.%%%+%-]+%.%w%w%w?%w?") ~= nil
	
end

Author: SuperHomie