validate email using regex

This commit is contained in:
GotPPay
2018-01-19 20:05:49 +01:00
parent 0727328e58
commit 00272ec67d
2 changed files with 9 additions and 5 deletions

View File

@@ -88,8 +88,9 @@ module.exports = {
repromptSpeech
);
} else if (!intent.slots.Message.value) {
intent.slots.Email.value = emailHelper.transformEmailFromAlexaResponse(intent.slots.Message.value);
if (
!emailHelper.validateEmailFromAlexaResponse (
!emailHelper.isEmailValid (
intent.slots.Email.value
)
) {