Flexible Boolean Validation for Laravel

php dev.to

Laravel validation is powerful — but when working with APIs, boolean values can be messy. ❗ The Problem Laravel’s default boolean validation does not handle string values like: "true" "false" 💡 The Solution I created a Laravel package that adds flexible boolean validation. ✨ Supports: true / false 1 / 0 "1" / "0" "true" / "false" 📦 Installation composer require alihaider/flexible-boolean 🚀 Usage $request->validate(

Read Full Tutorial open_in_new
arrow_back Back to Tutorials