On my sign up page I want users to confirm the password they chose using a confirm password textfield. I am using Swift.
Here is my code for my Sign Up
if(newUser.password != self.confirmPassword.text){
let alertController = UIAlertController(title: "Sign Up Failed", message: "Sorry, your Passwords were not matching.", preferredStyle: .Alert)
let OKAction = UIAlertAction(title: "OK", style: .Default) { (action) in
// ...
}
alertController.addAction(OKAction)
self.presentViewController(alertController, animated: true) {
// ...
}
}
This is in my @IBAction func confirmButton(sender: AnyObject)
Edit:
I am not getting an error, Parse still sign ups users if I just fill out a two different passwords or no password at all.
Thanks.
Aucun commentaire:
Enregistrer un commentaire