Checking your current account balance using the bot

In this step, I will explain how to build a FormFlow for checking your current account balance. After the savings account balance logic, append the following code for the current account logic:

//Current Account Balance Template         public Currentbalance Current_Balance;                             .Field("Current_Balance.AccountNumber",                             isCurrentBalance, validate: async (state,                             response) =>                                {                                   var result = new ValidateResult {                                   IsValid = true, Value = response };                                   string accountnumber = (response as                                   string);                                   int accountnumberlength =                                   accountnumber.Length;                                   if (accountnumberlength < 11 ||                                   accountnumberlength > 17)                                     {                                        result.Feedback = "Please enter                                        your valid current account                                        number";  result.IsValid = false; ...

Get Building Bots with Microsoft Bot Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.