Laravel - Modify Input Before Validation

June 12 2015, 5:46pm

Need to modify/sanitize data before form validation? You can just overload the all() method in your form request class. This came in handy because wanted to convert booleans being passed as strings "true" and "false" to real booleans so I could use the boolean validation rule on it, this allowed me to do it.