Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lablnet/php-validation
Performs Validation
https://github.com/lablnet/php-validation
class composer free package php validation
Last synced: about 2 hours ago
JSON representation
Performs Validation
- Host: GitHub
- URL: https://github.com/lablnet/php-validation
- Owner: lablnet
- License: mit
- Created: 2018-08-19T05:30:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-19T08:10:33.000Z (about 6 years ago)
- Last Synced: 2023-07-15T07:08:36.266Z (over 1 year ago)
- Topics: class, composer, free, package, php, validation
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP validation
## Requirement
- PHP
- Composer## install
run this command
``` composer require lablnet/validation ```## usage
```php
['required' => true, ],
'email' => ['required' => true],
'password' => ['required' => true, ],
];
$validation = new \Lablnet\Validation($_POST,$rules,'input');
if($validation->fail()){
$errors = $validation->error()->get();foreach ($errors as $error) {
foreach ($error as $value) {
echo $value."
";
}
}
} else {
//TO-Do create the user
}
```