How to provide validations in uipath Apps

I created a sample login form containing FirstName,LastName,Age,Email, Phone No and a submit button.
In the Submit button events I created a rule and provided an if condition Age>=18
In else part I provided a show message and passed a message Age is less than 18,

The issue im facing is if im providing Age as 20 then also in the pop up message it is showing as Age is less than 18. Can anyone please help me to resolve the issue.

Hi @Chippy_Kolot

Check the datatype of age…if its steing convert it and then use condition

Cheers

Can you please explain where I can change the datatype.

Hi @Chippy_Kolot

Do it like this cint(variable) . This converts to int

Cdbl(variable) converts to double

Use it

Cheers

@Chippy_Kolot ,

Please follow the below approach to be working.

  1. Drag a input control and make control type as number.
  2. Go to Button and write below rules
  3. Test it after that and its working for me.

Thanks,
Arvind