Hi guys im using formflow, everything is working smoothly, i just have some small details that i need to fix.
- Is there a way for me to check via regex the user inputs during the formflow? i need to check if the user inputs a valid name, email etc.
- Can i change the confirmation before profile complete to a yes or no button instead of typing yes or no or y or n?
Below is the code
[Serializable]
public class ProfileForm
{
[Prompt("What is your first name? {||}")]
public string FirstName;
[Prompt("What is your last name? {||}")]
public string LastName;
[Prompt("What is your email? {||}")]
public string Email;
public static IForm<ProfileForm> BuildForm()
{
return new FormBuilder<ProfileForm>()
.Message("Welcome to the profile bot!")
.OnCompletion(async (context, profileForm) =>
{
// Tell the user that the form is complete
await context.PostAsync("Your profile is complete.");
})
.Build();
}
}