TIF_E41201014/app/Http/Requests/SiswaRequest.php

40 lines
1.0 KiB
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SiswaRequest 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 [
'nis' => ['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'],
'nama_ayah' => ['required', 'string', 'max:255'],
'nama_ibu' => ['required', 'string', 'max:255'],
];
}
}