-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Yotpo mass create order API does not accept this email format: [email protected]
From what I understand, the exportOrderModel.js validates email address in the order and "skips" these orders in the payload so that the entire batch of orders being sent through API won't fail.
However, the regex seems to allow this format, which is inconsistent with the validation on Yotpo's end
const regex = /^\s*([#-\u002D\u002E\u003A-\u0040a-zA-Z0-9_" /\[\\^\{\}]{1,64})@((?:[-a-zA-Z0-9\u00AA\u00B5\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u0100]+\.)+[a-zA-Z\u00AA\u00B5\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u0100]{2,})\s*$/i
console.log(regex.test('[email protected]'))
salesforce-cartridge/cartridges/int_yotpo_sfra/cartridge/scripts/utils/constants.js
Line 36 in a05dd1a
| exports.EMAIL_VALIDATION_REGEX_FOR_YOTPO_DATA = /^\s*([#-\u002D\u002E\u003A-\u0040a-zA-Z0-9_" /\[\\^\{\}]{1,64})@((?:[-a-zA-Z0-9\u00AA\u00B5\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u0100]+\.)+[a-zA-Z\u00AA\u00B5\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u0100]{2,})\s*$/i; // eslint-disable-line |
Metadata
Metadata
Assignees
Labels
No labels