check(); } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation() { $this->mergePicture('picture'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { $rules = [ 'label' => 'required|string|between:3,255', 'picture_alt' => 'required|string|between:3,255', 'picture_title' => 'required|string|between:3,255', ]; return \array_merge( $rules, $this->pictureRules('picture', 331, 240, 331, 100, false), ); } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'picture_alt' => __(':field :inter:model', [ 'field' => __('validation.custom.alt_attribute'), 'inter' => __('validation.custom.of_the.vowel'), 'model' => __('validation.custom.picture'), ]), 'picture_title' => __(':field :inter:model', [ 'field' => __('validation.custom.title_attribute'), 'inter' => __('validation.custom.of_the.vowel'), 'model' => __('validation.custom.picture'), ]), ]; } }