Companion

object Companion

Contains static declarations for the EmailAddress type.

Properties

Link copied to clipboard
const val PATTERN: String

The pattern that an email address should match.

Functions

Link copied to clipboard

Creates an instance of EmailAddress from the string representation of the specified text, or throws an IllegalArgumentException if the string representation of text doesn't match the default pattern.

fun fromString(text: Any, pattern: Any): EmailAddress

Creates an instance of EmailAddress from the string representation of the specified text. Throws an IllegalArgumentException if the string representation of text doesn't match the string representation of the specified pattern, or if the string representation of pattern doesn't match the default pattern.

Link copied to clipboard

Creates an instance of EmailAddress from the string representation of the specified text, or returns null if the string representation of text doesn't match the default pattern.

fun fromStringOrNull(text: Any, pattern: Any): EmailAddress?

Creates an instance of EmailAddress from the string representation of the specified text. Returns null if the string representation of text doesn't match the string representation of the specified pattern, or if the string representation of pattern doesn't match the default pattern.