Validacion

Hola mi pregunta es la siguiente, hay una forma de validar un campo de texto mi idea es la siguiente, en un campo de texto el usuario debe escribir un texto ejemplo "juan" y luego presionar la tecla enter una vez presionada la tecla se habra otro evento. Gracias

1 respuesta

Respuesta
1
Puedes utilizar : stringExpression1 contains stringExpression2
y comparas el texto de tu fieldText con el de una variable:
Algo asi, a partir del ajemplo del manual
on mouseDown
digits = "juan"
aLetter=member("texto").text
if digits contains aLetter then
return TRUE
else
return FALSE
end if
end
Syntax stringExpression1 contains stringExpression2
Description Operator; compares two strings and determines whether stringExpression1 contains stringExpression2 (TRUE) or not (FALSE).
The contains comparison operator has a precedence level of 1.
The contains comparison operator is useful for checking whether the user types a specific character or string of characters. You can also use the contains operator to search one or more fields for specific strings of characters.
Example This example determines whether a character passed to it is a digit:
On isNumber aLetter
digits = "1234567890"
if digits contains aLetter then
return TRUE
else
return FALSE
end if
end

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas