. */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** * Class AttachmentFormRequest. * * @codeCoverageIgnore */ class AttachmentFormRequest extends Request { /** * Verify the request. * * @return bool */ public function authorize(): bool { // Only allow logged in users return auth()->check(); } /** * Returns the data required by the controller. * * @return array */ public function getAttachmentData(): array { return [ 'title' => $this->string('title'), 'notes' => $this->string('notes'), ]; } /** * Rules for this request. * * @return array */ public function rules(): array { // fixed return [ 'title' => 'between:1,255|nullable', 'notes' => 'between:1,65536|nullable', ]; } }