emailchatbotamazon-lexaws-lex

Amazon LEX native email slot type does not recognize emails that ends in 4 digits


It seems like Amazon.EmailAddress slot type has trouble recognizing emails that end in 4 or more numbers. For example john2341@gmail.com. It just automatically switches to the next intent and asks for an email repeatedly again and again.


Solution

  • You can have your own regex in the Lambda code validation and assign it to the email slot if it passes your regex.
    That's what I have done.
    And you will be validating the email address anyway after getting it in a slot, so it's better to have your own regex.
    Hope it helps.