Class
DSEmailAddressInputMask
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."))
Relationships
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
keyboardType
public var keyboardType: UIKeyboardType?
Any character can be used to enter an email address.
Methods
shouldAllow(replacementString:resultingString:)
public func shouldAllow(replacementString string: String, resultingString: String) -> Bool
Only allow a single @ sign but all other text is valid.
applyFormattingMask(to:)
public func applyFormattingMask(to text: String) -> String