Skip to main content

Posts

Showing posts with the label Validation digits in laravel

Laravel Validation digits Example

Hi Guys, Today, I will learn you to create validation digits in laravel.we will show example of laravel validation digits.The field under validation must be numeric and must have an exact length of value. Here, I will give you full example for simply Validation digits in laravel bellow. solution $request->validate([ 'rank' => 'required|digits:10', ]); 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() */ public function create() { return view('form'); } /** * Write code