Speaker
✓ Arduino Starter Kit or Amazon Echo Dot for free
✓ Group discount
✓ 2 in 1 conference special
Register now
✓ Arduino Starter Kit oder Amazon Echo Dot gratis
✓ Kollegenrabatt
✓ 2-in-1-Konferenzpaket
Jetzt anmelden
✓ 2-in-1 conference package
✓ Group discount
✓ Extra specials for freelancers
Register now
✓ 5-Tages-Special
✓ Kollegenrabatt
✓ Special Discount für Freelancer
Jetzt anmelden
Infos
10:45 - 11:30
Description
In most web applications today, we need to validate the data submitted. It can be through an API endpoint, a CSV line to import, a form, or anything that will be injected in the app. Since the latest PHP versions, we have more and more tools to improve type hinting in our code. There are multiple input validation methods. In France, we use the symfony/validator package a lot. However, those packages don’t validate the data at the right time. We need to build objects that may contain invalid data and then we apply some rules and retrieve the errors. This means that those objects must allow an invalid internal state. It’s not a really good approach to write solid code. Is there another solution? Of course, you can validate the data before building the object. Let’s dive into Valinor: a tiny library that will let you remove a lot of boilerplate code but still keep your application solid!