COVIDSafe code from version 1.8 (#15)

This commit is contained in:
COVIDSafe Support 2020-07-21 15:42:48 +10:00 committed by covidsafe-support
parent 6f92ff8fb8
commit 2257c542ed
45 changed files with 3547 additions and 839 deletions

View file

@ -268,7 +268,7 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
hasError = true
fullNameErrorLabel.text = "personal_details_name_error_prompt".localizedString()
}
else if textField.text?.range(of: #"^[A-Za-z0-9][A-Za-z'0-9\\-\\u00C0-\\u017F ]{0,80}$"#, options: .regularExpression) == nil {
else if textField.text?.range(of: #"^[A-Za-z0-9][A-Za-z'0-9\-\x{00C0}-\x{017F} ]{0,80}$"#, options: .regularExpression) == nil {
hasError = true
fullNameErrorLabel.text = "personal_details_name_characters_prompt".localizedString()
}
@ -303,7 +303,7 @@ class PersonalDetailsViewController: UIViewController, UITextFieldDelegate, UIPi
func updateContinueButton() {
firstnameTextField.text = firstnameTextField.text?.trimmingCharacters(in: .whitespacesAndNewlines)
if (self.ageTextField.text != "" && self.postcodeTextField.text?.count == 4 && self.firstnameTextField.text != "") {
if (self.ageTextField.text != "" && self.postcodeErrorLabel.isHidden && self.fullNameErrorLabel.isHidden) {
self.continueButton.isEnabled = true
self.continueButton.backgroundColor = UIColor.covidSafeButtonDarkerColor
} else {