ios - Parse signup validation -


i using parse handle user registration in swift-app building. started have been following 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 end states should consider adding: "form validtion, must add validation every place user can type something."

my sign code looks this:

@ibaction func signup(sender: anyobject) {     self.processsignup() }  func processsignup() {      var useremailaddress = emailaddress.text     var userpassword = password.text      // ensure username lowercase     useremailaddress = useremailaddress.lowercasestring      // create 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 wondering whether need add validation of input user, or if sort of validation not necessary when handling registrations parse.

thank time!

parse have validation in place checks valid email, not provide else. make sure users not enter empty or 3 digit password, should add password validation length or maybe match criteria (upper/lowercase/numbers). - make things quicker - add email validation well. can have @ question implementation tips.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -