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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.