|string> */ public function rules(): array { return [ 'title' => 'required|string|max:255|unique:articles,title,'.$this->article->id, 'body' => 'required|not_in:


', 'excerpt' => 'required', 'image' => 'image|mimes:png,jpg,jpeg|max:2048', ]; } public function messages() { return [ 'image.max' => 'The image size must not be greater than 2MB.', 'body.not_in' => 'The body field is required.' ]; } }