In a log in screen, how can I let the user enter if the email texbox contains "@"?

I need it to block the acces if PaswwordBox or TextBox(for email) are empty, but also i want it to block access if TextBox does not contain "@". I tried disabling the ENTER Button, but then There's no button so I cannot send the notification of "wrong email or password" and now if it contains "@" it unblocks the access even if both boxes are empty. Thanksss :wink:

1 Like

use an or block from the logic drawer and a not block from there
and use an if then elseif then else statement

Taifun

if        is empty CampoDeTexto1.Text
   or not contains text  CampoDeTexto1.Text
                   piece @
then ShowAlert "Wrong email or password"
elseif ...
else open another screen ...

OMG thanksss for your fast replyy, but i cannot find the "or" and "not" pieces :frowning:

Check this:

and they are in "Logic" section.

It was in Expert mode already

image

Ostras eres de españa no??

Tengo esos bloques pero no se como has hecho para que el bloque OR sea así

a mi me queda así

image

right click on the block (sí, hola!):

Ya esta Muchas graciasss

you should nest those "if" statements...like you have them, you can show the Alert and move to screen "Nivell" at the same time.

1 Like

Password* :wink:

La forma en que resolverías esto es pensar en el flujo de tu lógica. Piense en las condiciones if como comprobaciones, donde, si se pasa una de las condiciones if o if-else, el usuario no pasa la comprobación. Por lo tanto, el usuario solo debe ser enviado a la siguiente pantalla en la condición else, que solo se activará una vez que fallen las condiciones if y if-else.
Como han publicado Ramon y Taifun, puede combinar varias declaraciones if, siempre que las condiciones requeridas o lo que esté intentando hacer sean las mismas.

Su flujo lógico debe seguir lo que Taifun ha publicado.

Alternativamente (como ha dicho Ramon), puede "anidar" sus declaraciones if. Esta es sólo una forma elegante de decir poner una declaración if dentro de otra.