Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

537 B
Raw Blame
<?php

namespace HiEvents\Http\Request\Questions;

use HiEvents\Http\Request\BaseRequest;

class EditQuestionAnswerRequest extends BaseRequest
{
    public function rules(): array
    {
        return [
            'answer' => [
                'nullable',
                function ($attribute, $value, $fail) {
                    if (! is_string($value) && ! is_array($value)) {
                        $fail("The {$attribute} must be a string or an array.");
                    }
                },
            ],
        ];
    }
}