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