Buy your loved one the ultimate gift. Lifetime gift certificates are $100 off.

Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Jun. 27th 2017

Let's Build A Forum with Laravel and TDD: Refactoring to Custom Validation

Episode 53 Run Time 7:20

Download

As we've implemented our spam detection layer, have you noticed that we've split the validation process into two steps? First, we trigger Laravel's built-in validators, then we apply our spam detection. What if we could create a custom validation rule instead and clean up our code in the process? Well, we can!

View the source code for this episode on GitHub.