Sheath rule
native-invalid-enum-value
NativePHP alignment and scroll-axis attributes must use supported values.
#Why
Unsupported enum values are ignored, leaving the native default in place. A misspelled scroll axis leaves the view vertical even when another direction was intended.
#Examples
#Bad
{{-- Horizontal has unsupported casing, so the axis is ignored. --}}
<native:scroll-view axis="Horizontal">
<native:text>Items</native:text>
</native:scroll-view>
#Good
{{-- horizontal is an accepted exact value. --}}
<native:scroll-view axis="horizontal">
<native:text>Items</native:text>
</native:scroll-view>
The rule also checks static alignItems, alignSelf, justifyContent, and
textAlign values where the target element consumes them.
#Accepted Values
Accepted alignment values, aliases, and casing follow the installed NativePHP version.
Bound, interpolated, and otherwise dynamic values are skipped. When an attribute is written more than once, only the final effective value is checked.
#Options
All NativePHP rules accept nativeViewPaths. The default is
['views/native/']. See Native View Detection
for path configuration.
#See Also
Related rules check attribute names and unsupported assignments:
- native-unknown-attribute: Correct unsupported or misspelled attribute names
- NativePHP Plugin: Review supported value catalogs