kotools / types

Explicit types for Kotlin Multiplatform.
https://types.kotools.org
MIT License
90 stars 6 forks source link

🔥 Deletion of `EmailAddress.Companion.regex` property #614

Closed LVMVRQUXL closed 8 months ago

LVMVRQUXL commented 8 months ago

[!IMPORTANT] This is an incompatible source and binary change. See our versioning strategy for more details on when this change can be released.

📝 Description

Like commented in https://github.com/kotools/types/issues/586#issuecomment-2015469697, we want to remove the regex experimental property from the EmailAddress.Companion type for hiding implementation details.

// Actual
EmailAddress.regex // compilation passes

// Expected
EmailAddress.regex // compilation fails

Finally, we should also indicate the pattern used for validating email addresses in the documentation of the create and the createOrNull functions.

✅ Checklist

LVMVRQUXL commented 8 months ago

Removing this property will add documentation redundancy in the factory functions of the EmailAddress type. So we will not resolve this issue.