13.01.2017, 16:40
No body give me function
I found at least:
But how to upgrade this function how i mention check i want allow just from @gmail.com, @yahoo.com just some what i specified.
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; }