Replies: 4 comments 1 reply
This comment was marked as duplicate.
This comment was marked as duplicate.
Local-part propertyIt could be interesting to introduce a property Here's an example of calling this property from Kotlin code: val address: EmailAddress = requireNotNull(EmailAddress from "contact@kotools.org")
println(address.localPart) // contact |
0 replies
Factory function with customizable regular expression
For creating an Here's an example of calling the overload from Kotlin code: val address: EmailAddress? = EmailAddress.createOrNull("contact@kotools.org") {
localPart = Regex("[a-z]+") // the local part now only accepts 1 or more lowercase letters
domain = Regex("[a-z]+\.[a-z]+") // the domain now only accepts lowercase letters
// The regular expression used for validating the text input now looks like this: ^[a-z]+@[a-z]+\.[a-z]+$
}
println(address) // contact@kotools.org |
0 replies
|
Issues attached to #339 should be considered as the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Here's a curated list of tasks, associated with their first releasable version, for introducing the type
EmailAddress, suggested by @MichaelStH in #55.Planned
EmailAddresstype #339EmailAddressavailable on Java #356EmailAddressUnplanned
EmailAddress.lengthproperty #357EmailAddress.lengthavailable on Java (releasable in version 5.0.0 after makingStrictlyPositiveIntavailable on Java).EmailAddress.length.EmailAddress.domainproperty #358.EmailAddress.domainavailable on Java.EmailAddress.domain.EmailAddress.toNotBlankString()function #359.EmailAddress.toNotBlankString()available on Java (releasable in version 5.0.0 after makingNotBlankStringavailable on Java).EmailAddress.toNotBlankString().All reactions