OptionalallowedKeep only the listed tag names (implies stripTags for non-listed tags).
OptionalhtmlEncode HTML entities (<, >, &, ", ').
OptionalmaxTruncate the string to this many characters (applied after other transforms).
OptionalpatternReplace the entire string with an empty string if it does not match.
OptionalstripRemove all HTML tags.
OptionaltoConvert the string to lowercase.
OptionaltoConvert the string to uppercase.
OptionaltrimTrim leading and trailing whitespace.
Configuration for sanitizing a string value.
All options are optional and composable. When multiple options are enabled they are applied in a fixed, deterministic order: trim → case → pattern → stripTags → htmlEncode → maxLength.
Since
0.1.0