Latest 0.1.0
Homepage https://github.com/caoquocquy/qValidator
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

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.

Latest podspec

{
    "name": "qValidator",
    "version": "0.1.0",
    "summary": "A lib for validating input data.",
    "swift_version": "3.2",
    "homepage": "https://github.com/caoquocquy/qValidator",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "caoquocquy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/caoquocquy/qValidator.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "qValidator/Classes/**/*"
}

Pin It on Pinterest

Share This