-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21f5185
commit a94128c
Showing
1 changed file
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,16 +36,18 @@ $data = [ | |
'first' => 'Jane', | ||
'last' => 'Doe', | ||
], | ||
'items' => ['item1', 'item2'], | ||
'email' => '[email protected]', | ||
'password' => 'password1234', | ||
]; | ||
|
||
$validated = form()->validate($data, [ | ||
'name' => 'array()', | ||
'name.first' => 'required', | ||
'name.last' => 'required', | ||
'email' => 'required|email', | ||
'password' => 'required|min:8' | ||
'name' => 'array', | ||
'name.first' => 'string', | ||
'name.last' => 'optional|string', | ||
'items' => 'array<string>', | ||
'email' => 'email', | ||
'password' => 'min:8' | ||
]); | ||
|
||
if ($validated) { | ||
|
@@ -55,3 +57,29 @@ if ($validated) { | |
$errors = form()->errors(); | ||
} | ||
``` | ||
|
||
## Stay In Touch | ||
|
||
- [Twitter](https://twitter.com/leafphp) | ||
- [Join the forum](https://github.com/leafsphp/leaf/discussions/37) | ||
- [Chat on discord](https://discord.com/invite/Pkrm9NJPE3) | ||
|
||
## Learning Leaf PHP | ||
|
||
- Leaf has a very easy to understand [documentation](https://leafphp.dev) which contains information on all operations in Leaf. | ||
- You can also check out our [youtube channel](https://www.youtube.com/channel/UCllE-GsYy10RkxBUK0HIffw) which has video tutorials on different topics | ||
- You can also learn from [codelabs](https://leafphp.dev/codelabs/) and contribute as well. | ||
|
||
## Contributing | ||
|
||
We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our [contribution guide](https://leafphp.dev/community/contributing.html) and you'll be ready to make your first pull request 🚀. | ||
|
||
To report a security vulnerability, you can reach out to [@mychidarko](https://twitter.com/mychidarko) or [@leafphp](https://twitter.com/leafphp) on twitter. We will coordinate the fix and eventually commit the solution in this project. | ||
|
||
## Sponsoring Leaf | ||
|
||
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](https://opencollective.com/leaf) or check the [contribution page](https://leafphp.dev/support/) for a list of ways to contribute. | ||
|
||
And to all our [existing cash/code contributors](https://leafphp.dev#sponsors), we love you all ❤️ |