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