how to ask user to enter valid details in dialogflow - node.js

may i know how to ask user to give correct input in Dialogflow...
for example if user has to enter a number between 1-100 numbers but he entered a value exceeding that limit. how to verify it using Webhooks

Related

How to validate the days based on the month input from the user dialogflow

I have created a bot in dialogflow that gets firstname ,lastname, dobyear, dobmonth ,dobday from the user. I want to validate the days in terms of the month I get from the user in webhook nodejs. Example:
bot: enter yourdob -month
user: 02
bot: enter yourdob-date
user:31
bot:enter yourdob-year
user:1994
bot:This is invalid date.
I tried this method below,but did not work.
Well as I see, you can get the number of days that are in the month you provide, then compare with the number that the user put and get set the response depending if the number exceeds or covered

Validation username and password with some condtion

So I have to create code that validates (ask username and password) whether a password:
Contains at least 1 number
Contains at least 1 capital letter
Contains at least 1 small letter
Contains at least 1 special symbol
and again ask the username and password (the previous one that we entered) if enter the wrong one after 3rd attempt it will print account blocked!
I am not sure about the contains statements. I know you can just assign a variable += 1 every time they enter an incorrect or invalid password until that variable hits a certain number (3). Then it would print out a statement that says something along the lines of "Blocked".

How do I ask the user how many inputs they want to enter, and then have python display that number of inputs

How do I ask the user for a number of inputs and display the inputs which they asked for?
For example if I asked the user (('how many names would you like to enter')) and then I wrote the conditional statements and the program displayed ((Enter a name)) based on how many names the user wanted to input it would display that many inputs.
The goal of the exercise is to ask for a certain number of inputs execute that and append them into an empty list.
output:
ex.[kay,ray,may,jay]

How do I make a number to equal another number in dialogflow?

is there a way to get a paramater to be equal a different number?
for example - user entered the number "2" when asked to choose a number.
I want the bot to return the answer "your 2 is equal to 120"
and so on.
so the text will be "your $number is equal to $indexnumber"
I know that there isnt a way to calculate in dialogflow, but maybe an index can bypass that somehow.
that I can make a list where a number == another number depends on the user input.
thanks!
Dex.
You'll have to setup fulfillment to process parameter values. See this tutorial for how to setup fulfillment: https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation#enable_webhook_in_dialogflow

Chrome autofill messes up phone number on kentico bizform

I have a website built in Kentico 6. There is a contact us form with phone number field. Kentico's phone field format is US Phone Number which gives you three boxes (3+3+4). I have an address setup in Chrome's autofill settings with phone number as 123-456-7890 format (I tried (123) 456-7890 and 1234567890 as well). When filling out the form I select the value from the autofill and all fields are populated correctly except the phone number: phone number's area code and the next 3 numbers are flipped. For example: the real phone number is 612-556-9003, but after autofill it is displayed as 556-612-9003. see this image
Not sure what would cause that, but you could switch it over to a text field and then use a client side libary to control the field content or give it a format.
I've never had good luck using that form control without having to customize it. So the best thing to do is change the field control from a Phone number to a Textbox and add a regex to it to validate a phone number. Here is a good example of a valid 10 digit phone number regex.

Resources