All rules

Sheath rule

statamic-tags-directive-required-parameters

Literal Statamic @tags definitions must provide the parameters required by their core tag and method.
Package
Statamic
Category
Blade
Default severity
error by default
Auto-fix
Manual fix

#Why

An @tags definition can dispatch a valid tag without an input that the tag needs. The assigned result is then empty or the tag fails at runtime.

#Examples

#Bad

{{-- Both collection definitions omit a source. --}}
@tags('collection')
@tags(['articles' => ['collection' => []]])

#Good

{{-- The parameter map supplies the required collection source. --}}
@tags(['articles' => ['collection' => ['from' => 'articles']]])

#Notes

The rule uses the same Statamic 6 core requirements as component and fluent calls. Method suffixes and supported parameter aliases are included.

Dynamic parameter values and maps are skipped when they may supply the input at runtime. Static map unpacking follows write order, so a later concrete value can resolve an earlier unknown map and a later unknown map can make the result unverifiable.

#See Also

Related rules validate the directive and its tag identity: