You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Business API: Add Missing Contact Point Email Validation #32906
As an API user posting a filing, I want to get appropriate validation errors if I try and put in a contact point email address that would not pass the frontend validation, so that my saved data is accurate and reliable and will not cause issues if used again through the frontend.
On the frontend, the Contact Point email field is validated for proper email format and leading/trailing whitespace before submission. Ex: "a@b.c", " test@example.com" (leading space), or "test@example.com " (trailing space) all pass the amalgamation API but would be rejected by the frontend. (pls ignore the req for leading/trailing spaces in this ticket)
List of filings where contactPoint is required but email is not validated:
Alteration
Amalgamation Application
Change of Registration
Continuation In
Correction
Incorporation Application
Registration
Restoration
QA Notes
Ensure regression of amalgamation application through the frontend — ensure email address saves properly
Posting an amalgamation application through the API works as expected
Posting email address formats that would not pass the frontend cause the API to return an appropriate error message about invalid format:
changed the title [-]Business API: Add Missing Email Validation for Contact Point[/-][+]Business API: Add Missing Contact Point Email Validation[/+]on Mar 19, 2026
We will be handling spacing separately (discussing in refinement tomorrow). @vikas-gov we are validating the email format in the schema so we may not need to do anything - what is the format requirement for this ticket?
This ticket just says not 'invalid format: a@b.c', should we be following whatever rules we see in the front end or is there some specific requirements written for it somewhere?
@benjamin-bc-gov with the outstanding requirement above please follow the same rule as is applied in the UI. Let us know if you need help locating / verifying the rules.
so my code changes is a duplicate validation of the schema validation , but below are some of the wrong email patterns that will pass through the validation
` test@-example.com # hyphen at start of domain label test@example-.com # hyphen at end of domain label
test@[999.999.999.999] # IP octet out of range (0-255)
"hello world"@example.com # quoted local part allows anything inside quotes
tëst@example.com # unicode characters in local part aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com # no length limit
Verified that both frontend (FE) and backend (BE) email validations return appropriate errors for invalid email formats and successfully accept and save valid email addresses.
Tested email validation across different filing types, including company creation, restoration, Continuation In (CON IN), amalgamation, alteration, etc..
Activity
[-]Business API: Add Missing Email Validation for Contact Point[/-][+]Business API: Add Missing Contact Point Email Validation[/+]kialj876 commentedon Jul 27, 2026
We will be handling spacing separately (discussing in refinement tomorrow). @vikas-gov we are validating the email format in the schema so we may not need to do anything - what is the format requirement for this ticket?
This ticket just says not 'invalid format: a@b.c', should we be following whatever rules we see in the front end or is there some specific requirements written for it somewhere?
mstanton1 commentedon Jul 29, 2026
@benjamin-bc-gov with the outstanding requirement above please follow the same rule as is applied in the UI. Let us know if you need help locating / verifying the rules.
benjamin-bc-gov commentedon Jul 29, 2026
the regex for the front is below , i will use the same for API CC @kialj876 @mstanton1
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/mstanton1 commentedon Jul 29, 2026
Thanks @benjamin-bc-gov
benjamin-bc-gov commentedon Jul 29, 2026
`
All cases match the frontend behaviour exactly.
`
benjamin-bc-gov commentedon Aug 4, 2026
so my code changes is a duplicate validation of the schema validation , but below are some of the wrong email patterns that will pass through the validation
`
test@-example.com # hyphen at start of domain label
test@example-.com # hyphen at end of domain label
test@[999.999.999.999] # IP octet out of range (0-255)
"hello world"@example.com # quoted local part allows anything inside quotes
tëst@example.com # unicode characters in local part
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com # no length limit
`
@kialj876 @mstanton1
mstanton1 commentedon Oct 16, 2026
Let's leave the additional validations for now. The core goal was to ensure the FE and BE aligned.
At a later time we can bring in additional validations (FE/BE).
rsagpariya commentedon Oct 19, 2026
Verified on TEST: