Skip to content

Commit

Permalink
feat: add trimming of email during validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin9foong committed Nov 23, 2024
1 parent fd41c1a commit 59c652b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export const ConditionalRoutingOption = ({
if (recipients.length <= 0 || !recipients[0] || !option) {
return CONDITIONAL_ROUTING_EMAILS_OPTIONS_MISSING_ERROR_MESSAGE
}
if (recipients.some((recipient) => !isEmail(recipient))) {
if (recipients.some((recipient) => !isEmail(recipient.trim()))) {
return CONDITIONAL_ROUTING_INVALID_CSV_FORMAT_ERROR_MESSAGE
}
optionsSet.add(option)
Expand Down

0 comments on commit 59c652b

Please sign in to comment.