Skip to content

feat: add 'idn-email' format validation#204

Open
MichaelDark wants to merge 3 commits intoWorkiva:masterfrom
MichaelDark:master
Open

feat: add 'idn-email' format validation#204
MichaelDark wants to merge 3 commits intoWorkiva:masterfrom
MichaelDark:master

Conversation

@MichaelDark
Copy link

@MichaelDark MichaelDark commented Feb 27, 2025

Ultimate problem:

Lack of built-in 'idn-email' format validation.

How it was fixed:

It was fixed using rfc_6531 package.

Testing suggestions:

Testing is built-in into rfc_6531 package.

Potential areas of regression:

N/A.

@MichaelDark MichaelDark requested a review from a team as a code owner February 27, 2025 00:54
pubspec.yaml Outdated
@@ -1,5 +1,5 @@
name: json_schema
version: 5.2.0
version: 5.2.1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change, our automatic versioning system will handle it after the PR is merged.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelcarter-wf Addressed, version bump and changelog file reverted 👍🏻

ValidationContext defaultIdnEmailValidator(ValidationContext context, String instanceData) {
// No maintained dart packages exist to validate RFC6531,
// and it's too complex for a regex, so best effort is to pass for now.
if (rfc_6531.regExp.firstMatch(instanceData) == null) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we validate this format by default on the default schema version draft7, this is a breaking behavioral change. No need to handle this in your PR, but FYI we'll cut this as 6.0.0

@MichaelDark
Copy link
Author

@michaelcarter-wf All comments addressed, waiting for the review 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments