Ketan Mokariya

Ketan Mokariya

  • NA
  • 949
  • 290.9k

Bot framework how to validate date in form flow?

Apr 20 2018 2:00 AM
Hi,
 
I am working on Microsoft bot framework where i am developing conversation throgh Form Flow . I want to ask user for 2 dates. I want to perform custom validation logic on date like current date entered by user should be greater than previous date entered by user.
 
 Following is my property for FormFlow
  1. [Prompt("Please enter checkin date")]  
  2.  [Pattern(@"^\d{1,2}/\d{1,2}/\d{4}$")]  
  3.  public string checkindate { getset; }  
  4.   
  5.   [Prompt("Please enter checkin date")]  
  6.  [Pattern(@"^\d{1,2}/\d{1,2}/\d{4}$")]  
  7.  public string checkoutdate { getset; }  
i want to validate checkoutdate should be greater than checkindate. How i can do this in Bot framework.
 
Please help me with your suggestion.
 
Thanks,
Ketan