On leaving the field i want to show validation message for the first name or phone number

0
i want to create micro flow after leaving from the field i want to show validation error messages like full name will take only characters. I want to use Reqular expressions for the validate phone number, email how i will use this in micro flows.
asked
2 answers
-1

Hi Anjali,

you can call microflow in the onleave event of the widget and if these below expression return false then you can set validation feedback

Expression-

for Phone No isMatch($phoneNumber, '^\+?1?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$')

For full name isMatch($fullName, '^[A-Za-z\\s]+$')

 

Good luck!

answered
1

Hi Anjali,

You can add an Event: onLeave to trigger a microflow.

In this microflow you can validate a single attribute using regular expressions by putting something like this in a split condition:

isMatch($phone, '[0-9]{8-15}')

If false, then return validation feedback for that specific attribute.

Good luck!

answered