Quote:
Originally Posted by MerryDeer
How with this check is valid email?
|
This plugin causes random crashes, I recommend not to use it. Use a PAWN version instead.
---------------------------------------------------------------------------
There's a lot of possibilities for an email address to be valid, but I think a basic function can get the job done (you don't have to be so strict), people often use fake emails anyway. Just by checking if it meets a standard criteria works fine, for me at least.
pawn Код:
IsValidEmailAddress(const email[])
{
new at_pos = strfind(email, "@", true);
if(at_pos >= 1)
{
new offset = (at_pos + 1), dot_pos = strfind(email, ".", true, offset);
if(dot_pos > offset)
{
return 1;
}
}
return 0;
}