laravel 7 regular expression for letters digits and spaces code example
Example 1: laravel validation alphanumeric with spaces
[
'field' => 'regex:/^[a-zA-Z0-9\s]+$/',
]
Example 2: laravel validation alphanumeric with spaces
[
'field' => 'regex:[a-zA-Z0-9\s]+',
]