Skip to content

belalsamyyy/Authentication-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Authentication-Example

func validateFields() {
   do {
        let name = try userName_tf.validate(type: .required("User Name"))
        let email = try email_tf.validate(type: .email)
        let password = try password_tf.validate(type: .password)
         _ = try confirmPasswrod_tf.validate(type: .confirm(password_tf))

        self.simpleAlert(title: "Success", message: "you registerd Successfully !")
        save(name: name, email: email, password: password) // save in userDefaults

   } catch(let error) {
        self.simpleAlert(title: "Error", message: (error as! ValidationError).message)
   }
}

Author

BelalSamy, belalsamy10@gmail.com

License

Authentication-Example is available under the MIT license. See the LICENSE file for more info.

About

Minimalist validation with custom Alert error messages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages