PHP Validation Library - Validator - Validate Form
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
src
tests/phpunit/DawPhpValidator
.gitignore
LICENSE.txt
README.md
composer.json
composer.lock
composer.phar
phpunit.xml

README.md

DAW PHP Validator - Library - Form validation

Latest Stable Version License

DAW PHP Validator is a Open Source PHP library of simple validation system.

Verify easily the submitted data!

Author

Package developed by: Développeur web Freelance Developpeur PHP Freelance

Simple example

<?php

if ($request->isPost()) {
    $validator = new Validator();

    $validator->rules($arrayRules);

    if ($validator->isValid()) {
        // Response with success
        return $validator->getMessages()->toHtml();
    } else {
        return $validator->getErrorsHtml();
    }
}

Add custom validation rules:

<?php

Validator::extend('rule_name', function ($input, $value, $parameters) {
    return $value == $parameters;
}, 'Your custom error message.');

You also have many other features.

Requirements

  • PHP >= 7.0

Documentation

  • The documentation is in folder "docs" of this package:

English | French

Installation

Installation via Composer:

php composer.phar require stephweb/daw-php-validator 1.1.*

Contributing

Bugs and security Vulnerabilities

If you discover a bug or a security vulnerability within DAW PHP Validator, please send a message to Stephen. Thank you. All bugs and all security vulnerabilities will be promptly addressed.

License

The DAW PHP Validator is Open Source software licensed under the MIT license.