Cake Validation
assert
Our great sponsors
Cake Validation | assert | |
---|---|---|
2 | 7 | |
43 | 7,494 | |
- | 0.3% | |
0.0 | 0.0 | |
20 days ago | 4 months ago | |
PHP | PHP | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Cake Validation
-
PER Coding Style 1.0.0
CakePHPs validation library can be installed separately from the framework: https://github.com/cakephp/validation
-
How do you validate data?
The cakephp/validation package. Blog post
assert
-
OpenMarketplace v1.1.0 released
This is not Java where everything is nullable by default. Use that in your favor and set dependencies correctly via constructor like this. For this to correctly work, check the empty_data callable and webmozart/assert package:
-
Hi, I've created a PHP library that automagically creates a Builder for any class. Any review / idea is welcome!
I actually do have that case, many of them. For that, I use form_data. This example is a bit old-school, statically analyzed one would be using webmozarts/assert like:
-
Avoiding one-liners in PHP
For APIs relying on array and not something like cuyz/valinor (best deserializer I have ever seen), one-liners are still good with webmozart/assert:
-
GitHub - Clivern/Helium: 🐺 Fast, Secure and Reliable Newsletter System, Set up in Minutes.
// https://github.com/webmozarts/assert Assert::nullOrInteger($price = $data['price'] ?? null); if ($price) { $p->setPrice($price); // we don't care about return value }
-
Anybody interested in `is` and `?as` from Hack?
as will throw exception immediately, similar to assertion package:
-
Is it worth it to use Symfony Form with React?
What I do with the VueJS forms is using a assertion library like https://github.com/webmozarts/assert to handle the validation of the incoming data.
- Type Assumptions & Assertions simplified
What are some alternatives?
Respect Validation - The most awesome validation engine ever created for PHP
php-builder - A PHP trait to automagically create a Builder for any class - with no dependencies
Volan - Light and extendable schema validation library
CraueFormFlowBundle - Multi-step forms for your Symfony project.
Filterus - A simple filtering library for PHP
OpenMarketplace - Open-source Multi-Vendor Marketplace platform based on Sylius and Symfony.
ISO-codes - PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Manufacturing Industry, Phone numbers & Zipcodes for many countries
Theatrical-Players-Refactoring-Kata - Example from first chapter of 'Refactoring' by Martin Fowler, with tests and translations
Aura.Filter - Validate and sanitize arrays and objects.
php-cast
Linio Input - Abstracts HTTP request input handling, providing an easy interface for data hydration and validation
BitBagBible - BitBag coding standards that rock!