Skip Navigation
Expand
  • Advanced SearchOpens new dialog
    Enter plus (+) or minus (-) signs in search terms to make a word required or excluded
    Search Tips
    Filter by product
    Filter by category
Regex e-mail error via Connect API create/update operations
Answer ID 9714   |   Last Review Date 01/18/2024

Why am I getting REGEX errors when creating/updating contact e-mails via API Operations?

Environment:

B2C API 

B2C Email 

Issue:

Getting REGEX e-mail errors when creating/updating contacts via API operations.

Resolution:

Email address validation is handled by regular expressions configured within the Oracle B2C Service product. Email addresses much match a regex pattern to be allowed. 

The regex the product uses is: ^((([-_!#$%&'*+/=?^~`{|}\w]+(\.[.]?[-_!#$%&'*+/=?^~`{|}\w]+)*)|("[^"]+"))@[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*(\.[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*)+[; ]*)$

If you have any problems with a valid email d address that does not match that string, please contact the Oracle Support team by submitted a service request. 

Example of failed update:

{
   "type": "customersite.custhelp.com/services/rest/connect/exceptions/OSC-CREST-00006",
   "title": "An attempt to write a resource failed",
   "status": 400,
   "detail": "A problem setting a property was encountered: Pattern does not match: value 'customer@example.address.com' does not match pattern '^((([-_!#$%&'*+/=?^~`{|}\\w]+(\\.[.]?[-_!#$%&'*+/=?^~`{|}\\w]+)*)|(\"[^\"]+\"))@[0-9A-Za-z]+([\\-]+[0-9A-Za-z]+)*(\\.[0-9A-Za-z]+([\\-]+[0-9A-Za-z]+)*)+[; ]*)$'; Contact.Emails[].Address",
   "instance": "https://customersite.custhelp.com/services/rest/connect/v1.4/contacts/",
   "o:errorCode": "OSC-CREST-00006"
}