Added a function to do email validation in questionbot, using ask_freeform_question as a base. Tried to distill the format into something repeatable and structured. Also added a test. There's potential to abstract this out, to make a function like ask_specific_question that takes question_text and a validator function and the re-prompt if invalid, and generates a new question type.
Added a function to do email validation in questionbot, using ask_freeform_question as a base. Tried to distill the format into something repeatable and structured. Also added a test. There's potential to abstract this out, to make a function like ask_specific_question that takes question_text and a validator function and the re-prompt if invalid, and generates a new question type.