constrained_strings¶
- polyfactory.value_generators.constrained_strings.handle_constrained_string_or_bytes(random: Random, t_type: Callable[[], T], lower_case: bool = False, upper_case: bool = False, min_length: int | None = None, max_length: int | None = None, pattern: str | Pattern | None = None) T [source]¶
Handle constrained string or bytes, for example - pydantic constr or conbytes.
- Parameters:
- Returns:
A value of type T.