Skip to content

Commit 0ca959b

Browse files
sethfitzvcschapp
authored andcommitted
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 c357a50 commit 0ca959b

2 files changed

Lines changed: 176 additions & 281 deletions

File tree

0 commit comments

Comments
 (0)