Ver Mensaje Individual
  #16  
Antiguo 22-07-2008
Avatar de RolphyReyes
RolphyReyes RolphyReyes is offline
Miembro
 
Registrado: ago 2004
Ubicación: Santo Domingo
Posts: 285
Reputación: 22
RolphyReyes Va por buen camino
Smile Un codigo sencillo

Para validar Email.

Código Delphi [-]
function ValEmail(EMail: string): Boolean;
var
  s: string;
  ETpos: Integer;
begin
  if EMail<>'' then
  begin
      ETpos := pos('@', EMail);
      if ETpos > 1 then
      begin
        s := copy(EMail, ETpos + 1, Length(EMail));
        if (pos('.', s) > 1) and (pos('.', s) < length(s)) then
          Result := true
        else
          Result := false;
      end
      else
        Result := false;
    end else result:=true;
end;
__________________
Gracias,
Rolphy Reyes
Responder Con Cita