Skip to content

💡 The EmailAddress type #586

@LVMVRQUXL

Description

@LVMVRQUXL

📝 Description

Like suggested by @MichaelStH in #55, we would like to introduce a new EmailAddress type representing an email address on the Internet.

Here's the goal of API that we should provide after completing this topic:

interface EmailAddress {
    override fun equals(other: Any?): Boolean
    override fun hashCode(): Int
    override fun toString(): String
    
    companion object {
        fun create(text: String): EmailAddress
        fun create(text: String, regex: Regex): EmailAddress
        fun createOrNull(text: String): EmailAddress?
        fun createOrNull(text: String, regex: Regex): EmailAddress?
    }
}

✅ Checklist

The following issues are nice-to-have but not required for completing the minimum viable API of this type:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions