From 213a4d2994e7232d47f1d635d4360f9bf2235436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Antonio=20Rodr=C3=ADguez?= Date: Mon, 12 Dec 2016 12:47:44 +0100 Subject: [PATCH] [[FIX]] Prompt.confirm dialogs are very relaxed recognizing yes/no responses --- src/botbuilder-ext/patches.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/botbuilder-ext/patches.ts b/src/botbuilder-ext/patches.ts index 511efef..2c021cf 100644 --- a/src/botbuilder-ext/patches.ts +++ b/src/botbuilder-ext/patches.ts @@ -68,8 +68,8 @@ function patchPromptsChoice() { * w/o breaking backwards compatibility. */ function addLocalizedEntityRecognizerYesNoExp() { - ((BotBuilder.EntityRecognizer)).yesExp = /^(1|y|yes|yep|sure|ok|true|s|si|sí|sip|vale)/i; - ((BotBuilder.EntityRecognizer)).noExp = /^(2|n|no|nope|not|false|nop)/i; + ((BotBuilder.EntityRecognizer)).yesExp = /^(1|y|yes|yep|sure|of course|ok|true|s|si|sí|sip|vale)(\W|$)/i; + ((BotBuilder.EntityRecognizer)).noExp = /^(2|n|no|nope|not|false|nop)(\W|$)/i; } // Apply all the patches when loading this module