feat: implement barangay and household management with associated tests
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use App\Models\HouseholdMember;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateAdminHouseholdMemberRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'relationship' => [
|
||||
'required',
|
||||
'string',
|
||||
Rule::in([
|
||||
HouseholdMember::RELATIONSHIP_HEAD,
|
||||
HouseholdMember::RELATIONSHIP_SPOUSE,
|
||||
HouseholdMember::RELATIONSHIP_CHILD,
|
||||
HouseholdMember::RELATIONSHIP_PARENT,
|
||||
HouseholdMember::RELATIONSHIP_SIBLING,
|
||||
HouseholdMember::RELATIONSHIP_OTHER,
|
||||
]),
|
||||
],
|
||||
'full_name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:191',
|
||||
],
|
||||
'date_of_birth' => [
|
||||
'nullable',
|
||||
'date',
|
||||
'before_or_equal:today',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user