['required', Rule::in(['internal', 'unit'])], 'unit_id' => [ Rule::requiredIf($this->input('account_type') === 'unit'), 'nullable', 'integer', 'exists:units,id', ], 'history' => ['required', 'string', 'max:255'], 'value' => ['required', 'numeric', 'min:0.01'], 'due_date' => ['required', 'date'], 'financial_plan_account_id' => ['nullable', 'integer', 'exists:financial_plan_accounts,id'], 'obs' => ['nullable', 'string', 'max:1000'], ]; } }