Trimming empty string values
mabar opened this issue · comments
Description
Add trimming string values to support error-prone user-given form inputs
-
StringValue()
- parametertrim=bool
, defaultfalse
- Rules casting from string should also trim value, when casting is enabled (without any additional option). Specifically
BoolValue() castBoolLike
,FloatValue() castNumericString
,IntValue() castNumericString
,NullValue() castEmptyString
-
Options
dynamic context to change all of above dynamically in runtime. e.g.StringDynamicContext
withtrim=true
would enable all processedStringValue()
to trim values.trim=false
would disable all. Differentiating between implicit and explicit parameters is probably not needed.
Addition information
cc @mrceperka
Related issues
No response