PHPackages                             kayode/form-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. kayode/form-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

kayode/form-validator
=====================

Form validation library

60PHP

Since Nov 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kayode-suc/form-validator)[ Packagist](https://packagist.org/packages/kayode/form-validator)[ RSS](/packages/kayode-form-validator/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Form validator library
=============================

[](#simple-form-validator-library)

You are to note this project is an open source project incase there is an issue and i was unable to respose quickly, try your best to contribute and fix the issue.

Documentation
-------------

[](#documentation)

### INSTALLATION

[](#installation)

run this below comm

```
$  composer require kayode/form-validator

```

### METHODS AND PROPERTIES

[](#methods-and-properties)

this library has the following methods and property

```
use FormValidator\Form;

$validator = new form($_POST);
//validate methods: this is the method were you will be setting your validation rules
$validator->validate([]);
//passed methods: this methods will be use to check if each input passed the validation rules
$validator->passed();
//errors property: this property will be use to output all errors
$validator->errors[];
//errors property is the only available property
```

### SETTING VALIDATION RULES FOR FORM

[](#setting-validation-rules-for-form)

the `$validator->validate([])` method is use for setting validation rules example:

```
