Laravel validation alpha_num Example

Admin   Laravel   139  2021-03-14 23:50:05

Hi Guys,

Today, I will learn you to create validation alpha_num in laravel.we will show example of laravel validation alpha_num.The field under validation must be entirely alpha-numeric characters..you can simply apply to validation to alpha_num validation in laravel.in this validation only allow alpha_num characters.

Here, I will give you full example for simply alpha_num validation in laravel bellow.

solution

 

$request->validate([

'name' => 'required|alpha_num',

]);

Route : routes/web.php

 

Route::get('form/create','[email protected]');

Route::post('form/store','[email protected]')->name('form.store');

Controller : app/Http/Controllers/BlogController.php