Pydantic · Pipe
str_strip_whitespace
str_strip_whitespace=True removes leading and trailing whitespace from Pydantic string fields during validation. Set it in the model's ConfigDict.
Last updated
Syntax
model_config = ConfigDict(str_strip_whitespace=True)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
str_to_lowerstr_to_upperstr_min_lengthstr_max_lengthConfigDict