Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 26-05-2005
JXJ JXJ is offline
Miembro
 
Registrado: abr 2005
Posts: 2.475
Poder: 22
JXJ Va por buen camino
Smile

Esto es para aeguranos que la sintaxis de la cuenta de correo este
bien escrita. como el primer ejemplo que de di.

Código Delphi [-]
 
function IsValidEmail(const Value: string): Boolean;
 
function CheckAllowed(const s: string): Boolean;
var i: Integer;
begin
Result:= false;
for i:= 1 to Length(s) do
if not (s[i] in ['a'..'z', 
'A'..'Z', 
'0'..'9', 
'_', 
'-', 
'.']) then Exit;
Result:= true;
end;
 
var
i: Integer;
NamePart, ServerPart: string;
begin
Result:= False;
i:=Pos('@', Value);
if i=0 then Exit;
NamePart:=Copy(Value, 1, i-1);
ServerPart:=Copy(Value, i+1, Length(Value));
if (Length(NamePart)=0) or ((Length(ServerPart)<5)) then Exit;
i:=Pos('.', ServerPart);
if (i=0) or (i>(Length(serverPart)-2)) then Exit;
Result:= CheckAllowed(NamePart) and CheckAllowed(ServerPart);
end;

el codigo fuente de un pryecto de muestra. por si no fui claro.
http://greatis.com/delphicb/tips/lib...checkemail.zip
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 18:06:14.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi