Skip to main content

Posts

Showing posts with the label Laravel Validation Number Less Than

Laravel Validation Number Less Than Example

Hi Guys, Today, I will learn you to create validation lt in laravel.we will show example of laravel validation lt.The given field The field under validation must be less than the given field. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the size rule. Here, I will give you full example for simply lt validation in laravel bellow. solution $request->validate([ 'detail' => 'lt:20', ]); Route : routes/web.php Route::get('form/create','FromController@index'); Route::post('form/store','FromController@store')->name('form.store'); Controller : app/Http/Controllers/BlogController.php <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Blade; use App\Models\User; use App\Models\Post; class FromController extends Controller { /** * Write code on Method * * @return response() *