'required|string|min:2|max:255|unique:labels,name', 'color' => [ 'required', new Hex(), ], ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'name' => trans('validation.attributes.name'), 'color' => trans('validation.attributes.color'), ]; } }