orThrow
@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V5_1_0)
@ExperimentalSince(version = KotoolsTypesVersion.V4_5_3)
Deprecated (with error)
Use the 'of(String)' function instead.
Replace with
import org.kotools.types.EmailAddress
Content copied to clipboard
requireNotNull(EmailAddress of text)Content copied to clipboard
Creates an instance of EmailAddress from the specified text, or throws an IllegalArgumentException if the text doesn't match the default regular expression.
See the orNull function for returning null instead of throwing an exception in case of invalid text.
@DeprecatedAsErrorSince(version = KotoolsTypesVersion.V5_1_0)
@ExperimentalSince(version = KotoolsTypesVersion.V5_0_1)
Deprecated (with error)
Use the 'of(String, EmailAddressRegex)' function instead.
Replace with
import org.kotools.types.EmailAddress
Content copied to clipboard
requireNotNull(EmailAddress.of(text, regex))Content copied to clipboard
Returns an email address from the specified text, or throws an IllegalArgumentException if the text doesn't match the specified regex.
See the orNull function for returning null instead of throwing an exception in case of invalid text.