You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
993 B
39 lines
993 B
<?php |
|
|
|
namespace App\Http\Requests; |
|
|
|
use Illuminate\Foundation\Http\FormRequest; |
|
|
|
class ValidasiCreateKondisiPeti extends FormRequest |
|
{ |
|
/** |
|
* Determine if the user is authorized to make this request. |
|
*/ |
|
public function authorize(): bool |
|
{ |
|
return true; |
|
} |
|
|
|
/** |
|
* Get the validation rules that apply to the request. |
|
* |
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string> |
|
*/ |
|
public function rules(): array |
|
{ |
|
return [ |
|
'nama_kondisi' => 'required|string', |
|
'deskripsi_kondisi' => 'required|string', |
|
]; |
|
} |
|
|
|
public function messages() |
|
{ |
|
return [ |
|
'name.required' => 'Nama Kondisi harus diisi', |
|
'name.string' => 'Nama Kondisi harus berupa string', |
|
'description.required' => 'Deskripsi Kondisi harus diisi', |
|
'description.string' => 'Deskripsi Kondisi harus berupa string', |
|
]; |
|
} |
|
}
|
|
|