EmailAddress

public struct EmailAddress : IdentifierProtocol, Equatable

Represents an email address as a string

  • The string that is provided during initialization

    Declaration

    Swift

    public var originalString: String { get }
  • The normalized form used internally (may or may not be different)

    Declaration

    Swift

    public var normalizedString: String { get }
  • Initialize EmailAddress identifier

    Not full spec. Just uses a regext to ensure that there a character before and after the @ symbol followed by at least one period and another character

    Declaration

    Swift

    public init?(_ string: String)

    Parameters

    identifier

    an emaila ddress as a string to parse

    Return Value

    EmailAddress or nil if parsing fails