Solved

Validate a text box control

  • 16 January 2018
  • 1 reply
  • 26 views

Badge +8

I have a data entry form

It has several text box fields for entry

I would like an easy method of validating certain fields

ie Textbox1 can only have a value between 2200 and 2600

 

the only way i have resolved this is by having a rule on the control changing,and then using an advanced condition

must be an easier/better method

icon

Best answer by boringNerd1 16 January 2018, 08:47

View original

1 reply

Badge +15

Hi,


 


You can try specifying your own pattern. Select your text box, under properties, you should be able to select a Pattern. Click on it, then create your own validation pattern. 


 


For example, if you want your textbox to only contain a number between 2200 and 2600 (inclusive), you can use the following pattern:


^[2][2-6][0-9][0-9]$


 


The pattern used here is regular expression, so you can just play with it to get the validation pattern you want. So the pattern above will only match if the first digit is 2, the second digit is between 2 to 6, the third and fourth digit is between 0 to 9.


 


To trigger that validation, you will still need to insert a condition rule to check if the view or form passes the validation. This method remove the need to use the advanced condition rule.

Reply