Is valid email
#2

No body give me function

I found at least:

Code:
stock IsCorrectMail(mail[])
{
	new len = strlen(mail), bool:find[2], w;
 	if(!(6 < len < 129)) return false;
  	for(new l; l < len; l++)
  	{
   		if(mail[l] == '.') find[0] = true;
     	if(mail[l] == '@')
      	{
       		if(find[1]) return false;
         	find[1] = true;
          	w = l;
           	if(w > 64) return false;
       	}
        if(!(mail[l] >= 'A' && mail[l] <= 'Z' || mail[l] >= 'a' && mail[l] <= 'z' || mail[l] >= '0' && mail[l] <= '9' || mail[l] == '.' || mail[l] == '-' || mail[l] == '_' || mail[l] == '@')) return false;
   	}
    if(len - w > 65) return false;
    if(!find[0] || !find[1]) return false;
    return true;
}
But how to upgrade this function how i mention check i want allow just from @gmail.com, @yahoo.com just some what i specified.
Reply


Messages In This Thread
Is valid email - by MerryDeer - 13.01.2017, 16:29
Re: Is valid email - by MerryDeer - 13.01.2017, 16:40
Re: Is valid email - by SickAttack - 13.01.2017, 16:58
Re: Is valid email - by MerryDeer - 13.01.2017, 17:00
Re: Is valid email - by SickAttack - 13.01.2017, 17:17
Re: Is valid email - by MerryDeer - 13.01.2017, 17:19
Re: Is valid email - by SickAttack - 13.01.2017, 19:17
Re: Is valid email - by MerryDeer - 13.01.2017, 19:45
Re: Is valid email - by SickAttack - 13.01.2017, 20:04
Re: Is valid email - by Sew_Sumi - 13.01.2017, 21:03

Forum Jump:


Users browsing this thread: 4 Guest(s)