Mastering Laravel Validation Rules
- 1 book
So many rules, which one is best?
Laravel includes over 70 built-in rules. Choice is good, but sometimes it can be a bit daunting to know which rule is the best for a specific situation. For example, should this field be excluded or prohibited? Or, what's the difference between digits, integer, and numeric validation?
The Laravel docs are world-class, but wouldn't it be great if you didn't have to reference them so often while trying to get work done?
For every rule, we show you how it works with detailed code examples, explain when you'd use it, and point out things that may trip you up. Once you've worked through the book and exercises, you won't be visiting the docs as often, and when you do, you'll know much more quickly which rule is the right one to use.
Garbage in, garbage out
No one likes having to clean up messy data, like phone numbers or dates. Are you overwhelmed with bug reports from users typing in bad data and getting an exception? Or even worse, have you ever wondered if a malicious user could get up to mischief because some input wasn't handled properly?
Well-written validation rules can help with all of these scenarios. Enjoy having consistent data, cut down on the noise in your bug reporting, and sleep a little easier at night knowing you've handled user input safely.
We go beyond the mechanics of how rules work, and share our opinions on how to write secure, reliable, and easy-to-maintain validation logic. With our deep experience working in apps of all different sizes, we share some battle-tested strategies that will help you be much more confident in your choice of validation rules.
Will this really improve my skills?
We've all bought a new tech book, excited to level up our skills. While reading it, we're nodding our head - this is great information! But when we're all done and set the book back on the shelf, we're not really sure if we're any better at our day-to-day work.
This book was designed with learning and retention in mind. We write with a conversational style, and include a number of asides that keep you mentally engaged. For those who learn better by reading code, we also include numerous code blocks showing what data passes and fails validation.
We also offer a set of robust exercises to help you immediately practice what you've learned. Use your favorite editor and get hands-on experience. The exercises automatically check your work and guide you toward a solution without just giving you the answer.
No review yet.
Having experience in multiple disciplines and languages, Joel has become efficient at learning new technologies. He excels at helping others learn more effectively too.