How to validate an input pls

Hi,

I am trying to get pin code from the user, not sure how to validate it.

Also, tried locatin prompt.I am not getting how to extract only postalcode from it.

Thanks,
Jaya

1 Like

When you use location prompt in your bot, it will fetch user’s location.
If you just want to extract PinCode you can use this syntax: {{variables.varname.postalCode}}

1 Like

Thank you Pratik.

Could you also share how to add basic validations to user’s response pls?

1 Like

You can learn more about prompts and validation here: Prompts and Messages | yellow.ai

1 Like

Pratik, I did not find any option to validate a general user response, apart from the configured Name, mail, address, phone etc
I was looking for an option to verify user response using regex etc.I can use logic node to check the value, but still not sure how to build the condition.
Anyways, my current pincode issue has been resolved using location node.But, this would be good to know as well.

Thanks!

1 Like