Skip to main content
Version: 1.1.0

Feature Comparison

How Pedantigo compares to Pydantic v2 and go-playground/validator v10.

Legend: ✓ Supported | ✗ Not supported | ~ Partial


Validation Basics​

FeaturePedantigoPydanticValidatorDocs
Required fields✓✓✓Validation
Optional fields✓✓✓Validation
Default values (static)✓✓✗Constraints
Default values (dynamic)✓✓✗Validation
Field presence detection✓✓✓Initialization
Zero vs missing distinction✓✓~Initialization

String Constraints​

FeaturePedantigoPydanticValidatorDocs
Min/Max length✓✓✓String
Exact length✓~✓String
Email✓✓✓Format
URL✓✓✓Format
URI✓✗✓Format
UUID✓✓✓Format
UUID3/UUID4/UUID5✓✗✓Format
Regex/Pattern✓✓✓String
Enum/OneOf✓✓✓Constraints
Enum case-insensitive✓✗✓Constraints
Alpha/Alphanumeric✓✗✓String
ASCII only✓✗✓String
Multibyte chars✓✗✓String
Contains/Excludes✓✗✓String
Starts/Ends with✓✗✓String
Case validation✓✗✓String
Strip whitespace✓✓✗String
String transform✓✓✗String

Numeric Constraints​

FeaturePedantigoPydanticValidatorDocs
Min/Max value✓✓✓Numeric
Greater/Less than✓✓✓Numeric
Greater/Less or equal✓✓✓Numeric
Multiple of✓✓✗Numeric
Decimal precision✓✓✗Numeric
Disallow inf/nan✓✓✗Numeric
Strict types✗✓✗—
Positive/Negative✓✓✗Numeric

Format Validators​

FeaturePedantigoPydanticValidatorStandardDocs
IPv4/IPv6✓✓✓net.ParseIPFormat
IP (any)✓✓✓net.ParseIPFormat
CIDR✓✓✓RFC 4632Format
CIDRv4/CIDRv6✓✓✓RFC 4632Format
MAC address✓✗✓IEEE 802Format
Hostname✓✗✓RFC 952Format
Hostname RFC1123✓✗✓RFC 1123Format
FQDN✓✗✓DNS standardFormat
Port✓✗✓0-65535Format
TCP/UDP address✓✗✓net.ResolveTCPAddrFormat
HTTP URL✓✗✓RFC 3986Format
HTTPS URL✓✗✓RFC 3986Format
Credit card✓✓✓ISO/IEC 7812Format
Bitcoin address✓✗✓Base58CheckFormat
Bitcoin Bech32✓✗✓BIP-0173Format
Ethereum address✓✗✓EIP-55Format
ISBN✓✗✓ISO 2108Format
ISBN-10/ISBN-13✓✗✓ISO 2108Format
ISSN✓✗✓ISO 3297Format
SSN✓✗✓U.S. SSAFormat
EIN✓✗✓U.S. IRSFormat
Phone (E.164)✓~✓ITU-T E.164Format
Latitude✓✗✓WGS 84Format
Longitude✓✗✓WGS 84Format
Hex color✓~✓CSS ColorFormat
RGB/RGBA✓~✓CSS ColorFormat
HSL/HSLA✓~✓CSS ColorFormat
iscolor (alias)✓✗✓Any colorFormat
HTML✓✗✓HTML5Format
JWT✓~✓RFC 7519Format
JSON string✓✓✓RFC 8259Format
Base64✓✓✓RFC 4648Format
Base64URL✓✓✓RFC 4648 §5Format
Base64RawURL✓✗✓RFC 4648 §3.2Format
Base32✓✗✓RFC 4648 §6Format
Data URI✓✗✓RFC 2397Format
URN (RFC 2141)✓✗✓RFC 2141Format
MD4✓✗✓RFC 1320Format
MD5✓✗✓RFC 1321Format
SHA256/384/512✓✗✓FIPS 180-4Format
MongoDB ID✓✗✓ObjectIdFormat
Cron✓✗✓Cron exprFormat
Semver✓~✓Semver 2.0Format
Datetime format✓✓✓Go layoutFormat
Timezone (IANA)✓✗✓IANA tz databaseFormat
ULID✓✗✓CrockfordFormat
Luhn checksum✓✗✓ISO 7812Format
Country codes✓~✓ISO 3166-1Format
Currency codes✓~✓ISO 4217Format
Language codes✓~✓BCP 47Format
Postal codes✓✗✓Per-countryFormat

Collection Validation​

FeaturePedantigoPydanticValidatorDocs
Array/Slice min/max✓✓✓Collection
Element validation (dive)✓✓✓Collection
Map validation✓✓✓Collection
Map key validation (keys)✓✓✓Collection
Unique items✓✓✓Collection
Set types✗✓✗—
Tuple types✗✓✗—

Cross-Field Validation​

FeaturePedantigoPydanticValidatorDocs
Struct-level validators✓✓✓Cross-Field
Field comparisons✓✓✓Cross-Field
Cross-struct validation✓✓✓Cross-Field
Conditional required✓✓✓Cross-Field
Conditional required (all)✓✗✓Cross-Field
Conditional exclusion✓✓✓Cross-Field
Conditional exclusion (all)✓✗✓Cross-Field
Before validators✗✓✗—
After validators✓✓✗Custom Validators
Wrap validators✗✓✗—

Type Support​

FeaturePedantigoPydanticValidatorDocs
Primitives✓✓✓Validation
Pointers/Optional✓✓✓Validation
Nested structs✓✓✓Validation
Slices/Lists✓✓✓Collection
Maps/Dicts✓✓✓Collection
time.Time/datetime✓✓~Validation
time.Duration✓✓✗Validation
Secret types✓✓✗Secrets
Path types✓✓~Format
Literal types✗✓✗—
Union types✓✓✗Unions
Discriminated unions✓✓✗Unions
Generic structs✗✓✗—
Enum types~✓~Constraints
Decimal✗✓✗—

JSON Operations​

FeaturePedantigoPydanticValidatorDocs
Unmarshal + validate✓✓✗Simple API
Marshal to JSON✓✓✗Simple API
Marshal with field exclusion✓✓✗Simple API
Marshal with field selection✓✓✗Simple API
Marshal omitting zero values✓✓~Simple API
Marshal using JSON tags~✓✓Simple API
Custom MarshalJSON methods✗✓✓—
Streaming JSON✓✗✗Streaming
Partial JSON repair✗✗✗—

Schema Generation​

FeaturePedantigoPydanticValidatorDocs
JSON Schema✓✓✗Schema
OpenAPI ($ref)✓✓✗Schema
Schema caching✓✓✗Schema
Schema examples✓✓✗Schema
Schema title✓✓✗Schema
Field descriptions✓✓✗Schema
Deprecated fields✓✓✗Schema

Struct Configuration​

FeaturePedantigoPydanticValidatorDocs
Strict mode~✓✗Initialization
Extra fields forbid✓✓✗Initialization
Extra fields allow✓✓✗Initialization
Extra fields ignore✓✓✗Initialization
Validate on assignment✗✓✗—
Validate defaults✓✓✗Initialization
ORM mode✗✓✗—
Arbitrary types✗✓✗—
Immutable structs✗✓✗—

Error Handling​

FeaturePedantigoPydanticValidatorDocs
Multiple errors✓✓✓Errors
Field paths✓✓✓Errors
Custom messages~✓✓Errors
Error codes✓✓✗Errors
i18n/l10n✗~✓—
Custom error types✗✓✗—

Custom Validation​

FeaturePedantigoPydanticValidatorDocs
Custom validators✓✓✓Custom Validators
Validator registration✓✓✓Custom Validators
Alias tags✓~✓Custom Validators
Validator context✓✓✓Custom Validators
Struct-level✓✓✓Custom Validators
Plugin system✗✓✗—

Advanced Features​

FeaturePedantigoPydanticValidatorDocs
Type adapters✗✓✗—
Root models✗✓✗—
Dataclass support✗✓✗—
Config management✗✓✗—
Environment variables✗✓✗—
Struct copying✗✓✗—
Struct field reflection✗✓✗—
Recursive structs✓✓✓Validation

Summary​

144/147 features — Full parity with go-playground/validator. Near-complete parity with Pydantic v2.

CategoryCoverage
Validation Basics6/6
String Constraints16/16
Numeric Constraints7/8
Format Validators46/46
Collection Validation5/7
Cross-Field Validation7/10
Type Support12/15
JSON Operations7/9
Schema Generation7/7
Struct Configuration5/9
Error Handling4/6
Custom Validation5/6
Advanced Features1/8

Get Started​