38 lines
857 B
PHP
38 lines
857 B
PHP
<?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!'
|
|
];
|
|
}
|
|
}
|