How can I implement custom regex (PAN,GST,Email etc.) in Input Field?
6 Likes
Construct a Mobile Number Input Field using a Regex pattern.
- Drop the input field in canvas.
- In the property panel of the input field, select the “Regex” from the Input Type.
- Upon choosing the “Regex” option, a new field labeled “Enter regex” will become visible within the property selection. In this field, you can select from the given options. For Mobile Number, you can opt for the pattern ([0-9]) as an example
- Go to the “Data” tab and enter in the minimum and maximum length values based on your logic. Also, you have options to provide a message in case of unsuccessful attempts in both cases.
- Enter the regular expression for a Mobile Number into the designated “Regex” field. You also have the choice to include a message that will be displayed if the regex validation fails, along with an option to enable real-time messaging. Click on the “Apply” button and your mobile number input field is ready.
8 Likes