How to validate the number field?

Kanthy Prasad Kalepu shared this question 4 years ago
Answered

Hi Team,


How to validate the "number field"


for example: In my form i have Enter No. of Items Text box, in that user should enter only numeric values only not any characters or text or special characters.


if you can show please send me vp file for there below listed.


1) Number validation


2) Email Validation


3) Date format validation


Thanks


K

Comments (3)

photo
1

Hi Kanthy,


if you want to validate a regular expression just do the following:


1. drag to the canvas an input text, a button and a label.


2. select the button and create and "on click" event. Then, add a condition and build the following expression.


8d1c8c70ab3f35828ec84a5a01a55d6a


You need to drag the text function "regex", then drag the input text and go to the constants tap and drag the regular expression "is Email".


3. choose "set value", select the label and write in the calculator "valid" and the press OK.


4. To create the negative expression, click on the "else" button and repeat the previous steps, but in the second step you need to drag the "N" (not) expression before the "regex"


Repeat the same process for the number validation. If you want to validate a date format, you can find the regular expression by searching in Internet and you will only need to copy and paste it.


Best regards

photo
1

Hi, is it also possible to only validate if there is atleast one number entered in the textfield? I would need this for a password creation section. THe password needs to meet four requirments: between 8 - 32 characters, lower and uppercase characters, contain atleast 1 number and containt at least 1 special character. If one of the requirements is met the appropriate tickbox is ticked. I figured the first two out. But identifying if the password contains a number and special character seems to be bit more difficult. Do you have any tips how to fix this?

photo
1

Hi Jori,


This tutorial should help :


http://www.justinmind.com/support/int...


Best,


Sonia Durán