qValidator
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
Installation
qValidator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'qValidator'
Usage
You can now import Validator framework.
import qValidator
Add the fields that you want to validate
let validator = Validator()
validator.add(validation: Validation(validatable: fullNameTextField)
.required(message: "Full Name is required"))
validator.add(validation: Validation(validatable: emailTextField)
.required(message: "Email is required")
.email())
validator.add(validation: Validation(validatable: passwordTextField)
.required(message: "Password is required")
.password())
validator.add(validation: Validation(validatable: confirmPasswordTextField)
.required(message: "Confirm Password is required")
.confirmed(to: passwordTextField, message: "Comfirm Password does not match"))
let errorMessages = validator.validate()
Author
Quy Cao, [email protected]
License
Validator is available under the MIT license. See the LICENSE file for more info.