manzowa / manzowa-validator
Manzowa\Validator is a very small libray PHP
v1.0.0
2022-04-28 10:48 UTC
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2025-01-28 11:24:21 UTC
README
monzowa\manzowa-validator (Version: 0.0.1)
manzowa\manzowa-validator is a very small validation library, with the easiest and most usable API we could possibly create.
Functions
<?php
$validator = new Monzowa\Validator\Validator;
if ($validator->method()) {
$validator->validation(
[
"numero" => function () {
Validator::isEmpty()->isNumber()->get();
},
"code" => function () {
Validator::isEmpty()->isNumber()->size(4)->get();
},
"email" => function () {
Validator::isEmpty()->get();
},
"confirm_email" => function () {
Validator::isEmpty()->same("email")->get();
},
"password" => function () {
Validator::isEmpty()->get();
},
"confirm_password" => function () {
Validator::isEmpty()->get();
}
]
);
if ($validator->failed()) {
echo "<pre>";
print_r($validator->errors());
echo "</pre>";
} else {
echo "<pre>";
print_r($validator->resultats());
echo "</pre>";
}
}
?>
The simplest validation engine: - https://www.manzowa.com/validation