Is there anyway to make sure what the user types into a data field fits some criteria? Eg Regular expressions or something similar?
Thanks!
Is there anyway to make sure what the user types into a data field fits some criteria? Eg Regular expressions or something similar?
Thanks!
Hi BillyTheKid,
There are a couple of ways you can validate data that a user inputs in a field in your application.
You can make your own custom display type in Five with a regular expression and attach this to a form field. The video below demonstrates how to do this and how it works in an application.
Steps
Select Display Types in the menu.
Click the Add Item button.
Type a name in the Name field.
Select a display type in the Display Type field.
Click the Regular Expression switch.
Type your RegEx in the Mask Field.
Optional - Type a message in the Error Message field.
Save your display type.
Navigate to the required form field record.
Select the display type you just created in the Display Type field’s lookup.
Save your form.
You can also use the On Validate Event to validate data entered in a form field. The video below demonstrates how to do this and how it works in an application.
Steps
Select Functions in the menu.
Type an ID in the Function ID field.
Select a language in the Language field.
Click in the Code field to open Five’s Code Editor.
Type your code.
Click the Save button in the Code Editor.
Save your function.
Navigate to the required form field record.
Click the Events tab.
Select the function in the On Validate field’s lookup.
Save your form.