Skip to content

Commit aa3a6c3

Browse files
committed
Reparent 8 string constraints under PatternConstraint
Eliminates duplicated validate() and __get_pydantic_json_schema__() across CountryCodeAlpha2, HexColor, LanguageTag, NoWhitespace, SnakeCase, PhoneNumber, RegionCode, and WikidataId constraints. Each is now a thin __init__-only wrapper calling super().__init__(). PatternConstraint gains optional keyword-only description, min_length, max_length parameters for JSON Schema annotations. StringConstraint gains _raise_validation_error() to deduplicate error construction across PatternConstraint, JsonPointerConstraint, and StrippedConstraint.
1 parent eaa80f1 commit aa3a6c3

2 files changed

Lines changed: 170 additions & 282 deletions

File tree

0 commit comments

Comments
 (0)