IsValidMail: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
Justin Roth (talk | contribs)  (Created page with "{{Useful Function}} <lowercasetitle/> __NOTOC__  This function allows you to check e-mails, if they are in the correct format.  ==Syntax== <syntaxhighlight lang="lua">bool isValidMail ( stri...")  | 
				Justin Roth (talk | contribs)  No edit summary  | 
				||
| Line 18: | Line 18: | ||
end</syntaxhighlight>  | end</syntaxhighlight>  | ||
Author: SuperHomie  | |||
Revision as of 10:32, 20 July 2014
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