diff --git a/Pod/App/Controller.swift b/Pod/App/Controller.swift index a4bc467..87d1039 100644 --- a/Pod/App/Controller.swift +++ b/Pod/App/Controller.swift @@ -15,6 +15,7 @@ class Controller: UIViewController { var validation = Validation() validation.required = true + validation.format = "[\\w._%+-]+@[\\w.-]+\\.\\w{2,}" let inputValidator = InputValidator(validation: validation) textField.inputValidator = inputValidator @@ -53,7 +54,9 @@ class Controller: UIViewController { textField.formatter = CardExpirationDateFormatter() textField.placeholder = "Expiration Date (MM/YY)" - let inputValidator = CardExpirationDateInputValidator() + var validation = Validation() + validation.required = true + let inputValidator = CardExpirationDateInputValidator(validation: validation) textField.inputValidator = inputValidator return textField