Skip to main content
Version: 1.0.0

Feature Comparison

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

Legend: ✓ Supported | ✗ Not supported | ~ Partial


Validation Basics

FeaturePedantigoPydanticValidatorDocs
Required fieldsValidation
Optional fieldsValidation
Default values (static)Constraints
Default values (dynamic)Validation
Field presence detectionInitialization
Zero vs missing distinction~Initialization

String Constraints

FeaturePedantigoPydanticValidatorDocs
Min/Max lengthString
Exact length~String
EmailFormat
URLFormat
URIFormat
UUIDFormat
Regex/PatternString
Enum/OneOfConstraints
Enum case-insensitiveConstraints
Alpha/AlphanumericString
ASCII onlyString
Contains/ExcludesString
Starts/Ends withString
Case validationString
Strip whitespaceString
String transformString

Numeric Constraints

FeaturePedantigoPydanticValidatorDocs
Min/Max valueNumeric
Greater/Less thanNumeric
Greater/Less or equalNumeric
Multiple ofNumeric
Decimal precisionNumeric
Disallow inf/nanNumeric
Strict types
Positive/NegativeNumeric

Format Validators

FeaturePedantigoPydanticValidatorStandardDocs
IPv4/IPv6net.ParseIPFormat
IP (any)net.ParseIPFormat
CIDRRFC 4632Format
CIDRv4/CIDRv6RFC 4632Format
MAC addressIEEE 802Format
HostnameRFC 952Format
Hostname RFC1123RFC 1123Format
FQDNDNS standardFormat
Port0-65535Format
TCP/UDP addressnet.ResolveTCPAddrFormat
Credit cardISO/IEC 7812Format
Bitcoin addressBase58CheckFormat
Bitcoin Bech32BIP-0173Format
Ethereum addressEIP-55Format
ISBNISO 2108Format
ISBN-10/ISBN-13ISO 2108Format
ISSNISO 3297Format
SSNU.S. SSAFormat
EINU.S. IRSFormat
Phone (E.164)~ITU-T E.164Format
LatitudeWGS 84Format
LongitudeWGS 84Format
Hex color~CSS ColorFormat
RGB/RGBA~CSS ColorFormat
HSL/HSLA~CSS ColorFormat
iscolor (alias)Any colorFormat
HTMLHTML5Format
JWT~RFC 7519Format
JSON stringRFC 8259Format
Base64RFC 4648Format
Base64URLRFC 4648 §5Format
Base64RawURLRFC 4648 §3.2Format
MD4RFC 1320Format
MD5RFC 1321Format
SHA256/384/512FIPS 180-4Format
MongoDB IDObjectIdFormat
CronCron exprFormat
Semver~Semver 2.0Format
Datetime formatGo layoutFormat
ULIDCrockfordFormat
Luhn checksumISO 7812Format
Country codes~ISO 3166-1Format
Currency codes~ISO 4217Format
Language codes~BCP 47Format
Postal codesPer-countryFormat

Collection Validation

FeaturePedantigoPydanticValidatorDocs
Array/Slice min/maxCollection
Element validation (dive)Collection
Map validationCollection
Map key validation (keys)Collection
Unique itemsCollection
Set types
Tuple types

Cross-Field Validation

FeaturePedantigoPydanticValidatorDocs
Struct-level validatorsCross-Field
Field comparisonsCross-Field
Cross-struct validationCross-Field
Conditional requiredCross-Field
Conditional required (all)Cross-Field
Conditional exclusionCross-Field
Conditional exclusion (all)Cross-Field
Before validators
After validatorsCustom Validators
Wrap validators

Type Support

FeaturePedantigoPydanticValidatorDocs
PrimitivesValidation
Pointers/OptionalValidation
Nested structsValidation
Slices/ListsCollection
Maps/DictsCollection
time.Time/datetime~Validation
time.DurationValidation
Secret typesSecrets
Path types~Format
Literal types
Union typesUnions
Discriminated unionsUnions
Generic structs
Enum types~~Constraints
Decimal

JSON Operations

FeaturePedantigoPydanticValidatorDocs
Unmarshal + validateSimple API
Marshal to JSONSimple API
Marshal with field exclusionSimple API
Marshal with field selectionSimple API
Marshal omitting zero values~Simple API
Marshal using JSON tags~Simple API
Custom MarshalJSON methods
Streaming JSONStreaming
Partial JSON repair

Schema Generation

FeaturePedantigoPydanticValidatorDocs
JSON SchemaSchema
OpenAPI ($ref)Schema
Schema cachingSchema
Schema examplesSchema
Schema titleSchema
Field descriptionsSchema
Deprecated fieldsSchema

Struct Configuration

FeaturePedantigoPydanticValidatorDocs
Strict mode~Initialization
Extra fields forbidInitialization
Extra fields allowInitialization
Extra fields ignoreInitialization
Validate on assignment
Validate defaultsInitialization
ORM mode
Arbitrary types
Immutable structs

Error Handling

FeaturePedantigoPydanticValidatorDocs
Multiple errorsErrors
Field pathsErrors
Custom messages~Errors
Error codesErrors
i18n/l10n~
Custom error types

Custom Validation

FeaturePedantigoPydanticValidatorDocs
Custom validatorsCustom Validators
Validator registrationCustom Validators
Alias tags~Custom Validators
Validator context
Struct-levelCustom Validators
Plugin system

Advanced Features

FeaturePedantigoPydanticValidatorDocs
Type adapters
Root models
Dataclass support
Config management
Environment variables
Struct copying
Struct field reflection
Recursive structsValidation

Summary

143/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 Validation4/6
Advanced Features1/8

Get Started