Ver Mensaje Individual
  #5  
Antiguo 04-03-2024
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 913
Reputación: 23
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Si me lo permiten, propongo una pequeña variante...

Código Delphi [-]

function TFunciones.ValidarEntrada(Key: Char; Tipo: TTipoEntrada): Char;
const
  ACheckingKey:Array[TTipoEntrada] of String=('abcdefghijklmnopqrstuvwxyz'+#7+#8+#9,
                                           '0123456789+-'#8+#13,
                                           '0123456789.'+#8,
                                           '0123456789abcdefghijklmnopqrstuvwxyz '+#7+#8);
begin
  result:=#0;
  if Pos(lowercase(key), ACheckingKey[Tipo])>0 then
     result:=Key;
end;
Saludos cordiales
Responder Con Cita