Closed VeenaMalali13 closed 3 years ago
When user types nothing in input and hit enter/submit button, it should not create new user message with createChatBotMesage() method. Rather it should not accept null value. Trying to do this, but not getting solution.
Hi there!
You can pass a function to the chatbot to check if the client message is valid or not:
const validator = (input) => {
if (input.length > 3) return true;
return false
}
<Chatbot messageParser={messageParser} config={config) actionProvider={actionProvider} validator={validator} />
Thank You Fredrik...This helped me
When user types nothing in input and hit enter/submit button, it should not create new user message with createChatBotMesage() method. Rather it should not accept null value. Trying to do this, but not getting solution.