TIF_E41201014/app/Http/Requests/GuruRequest.php

41 lines
1.0 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class GuruRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules()
{
return [
'username' => ['required'],
'nip' => ['required', 'string', 'max:12'],
'foto' => ['image', 'mimes:jpeg,png,jpg', 'max:2048'],
'nama' => ['required', 'string', 'max:255'],
'tempat_lahir' => ['required', 'string', 'max:255'],
'tanggal_lahir' => ['required', 'date'],
'jenis_kelamin' => ['required'],
'no_hp' => ['required', 'string', 'max:13'],
'alamat' => ['required', 'string', 'max:255'],
'jurusan_id' => ['required'],
'status_juri' => ['required'],
];
}
}