Skip to content

A lightweight and extensible validation engine for ImpulsePHP components. Provides form validation rules and unified syntax for server-side validation.

Notifications You must be signed in to change notification settings

ImpulsePHP/validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImpulsePHP Validator

A lightweight and extensible validation engine for ImpulsePHP. The validator provides common validation rules and a unified API for server-side form validation.

Installation

Use Composer to add the package to your project:

composer require impulsephp/validator

If you are working from the source repository, run composer install to generate the autoloader.

Quick start

use Impulse\Validator\Validator;

$validator = new Validator();

$errors = $validator->validate('username', 'Bob', 'required|min_length:3');

if ($errors) {
    // Handle validation errors
}

Documentation

More extensive documentation is available in the docs directory:

Testing

Unit tests are written with PHPUnit. From the project root run:

composer install
vendor/bin/phpunit

A simple test configuration is included in phpunit.xml.

About

A lightweight and extensible validation engine for ImpulsePHP components. Provides form validation rules and unified syntax for server-side validation.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages