I am using Parse handle user registration in the Swift-app I am building. To get started I have been following this tutorial: http://blog.bizzi-body.com/2015/02/10/ios-swift-1-2-parse-com-tutorial-users-sign-up-sign-in-and-securing-data-part-3-or-3/
In the end it states that I should consider adding: "Form validtion, you really must add validation to every place a user can type something."
My sign up code currently looks like this:
@IBAction func signUp(sender: AnyObject) {
self.processSignUp()
}
func processSignUp() {
var userEmailAddress = emailAddress.text
var userPassword = password.text
// Ensure username is lowercase
userEmailAddress = userEmailAddress.lowercaseString
// Create the user
var user = PFUser()
user.username = userEmailAddress
user.password = userPassword
user.email = userEmailAddress
user.signUpInBackgroundWithBlock {
(succeeded: Bool, error: NSError?) -> Void in
if error == nil {
dispatch_async(dispatch_get_main_queue()) {
self.performSegueWithIdentifier("signInToNavigation", sender: self)
}
} else {
self.activityIndicator.stopAnimating()
if let message: AnyObject = error!.userInfo!["error"] {
self.message.text = "\(message)"
}
}
}
}
I am wondering whether I need to add any extra validation of what is input by the user, or if this is sort of validation is not necessary when handling registrations with Parse.
Thank you for your time!