Update README.md

Fixed bug with ZipCodeRule (: for the place of =)
This commit is contained in:
Asia 2017-06-02 15:35:07 +02:00 committed by GitHub
parent 2a6c23ad9e
commit d89d18b019
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ override func viewDidLoad() {
// You can now pass in regex and length parameters through overloaded contructors
validator.registerField(phoneNumberTextField, errorLabel: phoneNumberErrorLabel, rules: [RequiredRule(), MinLengthRule(length: 9)])
validator.registerField(zipcodeTextField, errorLabel: zipcodeErrorLabel, rules: [RequiredRule(), ZipCodeRule(regex = "\\d{5}")])
validator.registerField(zipcodeTextField, errorLabel: zipcodeErrorLabel, rules: [RequiredRule(), ZipCodeRule(regex : "\\d{5}")])
// You can unregister a text field if you no longer want to validate it
validator.unregisterField(fullNameTextField)