| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Leaf's form validation functionality packaged as a serve-yourself module.
You can easily install Leaf using the Leaf CLI:
leaf install formOr via Composer.
composer require leafs/form<?php
$data = [
'name' => [
'first' => 'Jane',
'last' => 'Doe',
],
'items' => ['item1', 'item2'],
'email' => 'example@example.com',
'password' => 'password1234',
];
$validated = form()->validate($data, [
'name' => 'array',
'name.first' => 'string',
'name.last' => 'optional|string',
'items' => 'array<string>',
'email' => 'email',
'password' => 'min:8'
]);
if ($validated) {
// do something
} else {
// get errors
$errors = form()->errors();
}We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.
To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.
We are committed to keeping Leaf open-source and free, but maintaining and developing new features now requires significant time and resources. As the project has grown, so have the costs, which have been mostly covered by the team. To sustain and grow Leaf, we need your help to support full-time maintainers.
You can sponsor Leaf and any of our packages on open collective or check the contribution page for a list of ways to contribute.
And to all our existing cash/code contributors, we love you all ❤️
| Back | FazBrowse Home | New Git URL |