I need to create a template with Flow option for Registration. But, I need to validate number field and Date Picker Field in that. Number Field should be 10 digits and Date Picker Field is a DoB the Age of user should be grater than 10.
You have two options: 1. Set hard-coded validations in your Flow JSON definition 2. Set up an Endpoint for your Flow, and validate server-side
Set hard-coded validations in your Flow JSON definition
This is by far the easier method, and should get you the functionality you want.
* For the number field, you can set the min-chars
and max-chars
of the component to 10
* For the Date Picker field, you can set the min-date
property such that users can't set a date younger than 10 years. (Note that there are currently some nuances with the way the DatePicker components works, so please read the guidelines for use).
Set up an Endpoint for your Flow, and validate server-side This solution is more complex to set up, but gives you more control. I'd recommend against this unless you absolutely need the added control.
data_exchange
and validate the entered data on your server, and display the relevant errors back to the user.