['required', 'string'], 'from' => ['required', 'integer', 'min:1'], 'into' => ['required', 'integer', 'min:1'], ]; } public function messages() { return [ 'from.required' => 'Choose the tag to merge.', 'into.required' => 'Choose the tag to merge into.', 'from.integer' => 'The tag to merge must be a valid ID.', 'into.integer' => 'The tag to merge into must be a valid ID.', ]; } /** * The taxonomy from the URL, or '' when it is not one this plugin merges. * * The allowlist is the boundary, as in ReorderTermsRequest: without it * the route would delete terms of any taxonomy on the site. */ public function mergeableTaxonomy(): string { $taxonomy = \is_string($this->taxonomy) ? $this->taxonomy : ''; return TermMergeService::isMergeable($taxonomy) ? $taxonomy : ''; } }