a2172f0851
Hopefully this will result in slightly better code.
36 lines
798 B
PHP
36 lines
798 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\People;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SignificantOthersRequest 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
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'first_name' => 'required|string',
|
|
'gender' => 'in:male,female,none',
|
|
'status' => 'in:active,past|nullable',
|
|
'is_birthdate_approximate' => 'required|in:unknown,approximate,exact',
|
|
'birthdate' => 'date|nullable',
|
|
'age' => 'int|nullable',
|
|
];
|
|
}
|
|
}
|