Membuat tampilan menu master ijin usaha
This commit is contained in:
37
app/Http/Requests/IjinUsahaRequest.php
Normal file
37
app/Http/Requests/IjinUsahaRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Lpj\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class IjinUsahaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$rules = [
|
||||
'nama_ijin_usaha' => 'required|string|not_regex:/^\d+$/|max:255'
|
||||
];
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'nama_ijin_usaha.required' => 'Nama Ijin Usaha harus diisi!',
|
||||
'nama_ijin_usaha.not_regex' => 'Nama Ijin Usaha harus berupa huruf!',
|
||||
'nama_ijin_usaha.max' => 'Nama Ijin Usaha maksimal 255 huruf!'
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user