I'm using following code to get user input for a phone number. I want to validate user input and if it is incorrect, need to ask the user to enter again.
[function (session, results, next) {
builder.Prompts.text(session, 'I will also need to know your contact number.');
}
,function (session, results, next) {
session.userData.contactNo = results.response;
next();
}]
I tried this example, but it gives a warning saying it is deprecated. Appreciate any help regarding the correct way to do this(without using the deprecated method). My phone number regex is ^[689]\d{3}\s?\d{4}$
via Channa Somathilaka
No comments:
Post a Comment