Open jenil777007 opened 2 years ago
hi @jenil777007 did you find a solution to this issue? Something similar happens when the input exceeds the length of the terminal and starts a new line.
config Templates in promptui.Prompt to control output content format,more detail please refer template
Try this:
emailPrompt := promptui.Prompt{
Label: "Email",
Validate: func(input string) error {
regex := regex.MustCompile(`([a-z]+)@email.com`)
if !regex.MatchString(input) {
return errors.New("Wrong mail format")
}
return nil
},
}
Issue reproduction:
Issue: