How to check if player entered an email
#6

Код:
if(!sscanf(inputtext, "{s[256]'@'s[256]'.'s[256]}")) 
{
	// the email is valid depends on those patterns...
}
Or you can write a function to make it easier to use if you want to call it multiple times.
Код:
IsValidEmail(text[]) // It will return true if text[] is a valid email, it will return false otherwise.
{
	return !sscanf(text, "{s[256]'@'s[256]'.'s[256]}");
}
Reply


Messages In This Thread
How to check if player entered an email - by AndreiWow - 29.01.2017, 15:23
Re: How to check if player entered an email - by oMa37 - 29.01.2017, 15:26
Re: How to check if player entered an email - by SyS - 29.01.2017, 15:26
Re: How to check if player entered an email - by AndreiWow - 29.01.2017, 15:34
Re: How to check if player entered an email - by AndreiWow - 30.01.2017, 18:18
Re: How to check if player entered an email - by X337 - 30.01.2017, 18:26
Re: How to check if player entered an email - by AndreiWow - 30.01.2017, 18:34
Re: How to check if player entered an email - by SyS - 31.01.2017, 00:42
Re: How to check if player entered an email - by AndreiWow - 31.01.2017, 12:17
Re: How to check if player entered an email - by Lordzy - 31.01.2017, 12:40

Forum Jump:


Users browsing this thread: 1 Guest(s)