how to login but only with alpha numeric data type in mobile

how to login but only with alpha numeric data type in mobile

  

i want to login in my mobile apps but there's must be set a validation that user only can input alpha numeric, what condition/js that can i use? 

Hi Erron your regex is almost correct but you need to put the ^ inside the square parenthesis to negate the set like so: 

[^A-Za-z0-9]+, 

If you find a match to this expression then the password is invalid. 


What you're doing right now is if it finds 1 or more alphanumeric characters it returns true, so a string like "a_!" will pass.

Solution

Hi Erron,

I prefer to use the js node as a more contained element, with input and output parameters that can be used in the action flow.


Cheers,

Tiago.

Solution

Afonso Aguas wrote:

Hi Erron your regex is almost correct but you need to put the ^ inside the square parenthesis to negate the set like so: 

[^A-Za-z0-9]+, 

If you find a match to this expression then the password is invalid. 


What you're doing right now is if it finds 1 or more alphanumeric characters it returns true, so a string like "a_!" will pass.


i still can't get the validation, so when i click login it always pass to next screen

Tiago Gafeira wrote:

Hi Erron,

I prefer to use the js node as a more contained element, with input and output parameters that can be used in the action flow.


Cheers,

Tiago.


thank you so much for you solution