EnterpriseDS Documentation

Class DSEmail​Address​Input​Mask

public class DSEmailAddressInputMask: DSInputMask  

An input mask, when assigned to a DSTextField, will enforce use of an email keyboard for text entry and prevents invalid typing of email addresses where possible.

It's recommended to use the DSEmailAddressValidationRule along with this mask.

let textField = DSTextField()

textField.inputMask = DSEmailAddressInputMask()
textField.addValidationRule(DSEmailAddressValidationRule(message: "Email is incorrect."))
DSEmailAddressInputMask DSEmailAddressInputMask DSInputMask DSInputMask DSEmailAddressInputMask->DSInputMask

Conforms To

DSInputMask

A masking object that controls what can be legally typed into a DSTextField and handles type formatting while that typing takes place. They do not validate but often "partner" up with validation rules.

Initializers

init()

public init()  

Properties

keyboard​Type

public var keyboardType: UIKeyboardType?  

Any character can be used to enter an email address.

Methods

raw​Text(from:​)

public func rawText(from text: String) -> String  

The entered text.

should​Allow(replacement​String:​resulting​String:​)

public func shouldAllow(replacementString string: String, resultingString: String) -> Bool  

Only allow a single @ sign but all other text is valid.

apply​Formatting​Mask(to:​)

public func applyFormattingMask(to text: String) -> String