This repository was archived by the owner on Jul 22, 2026. It is now read-only.
Repository navigation
v1.4.0 — Precision & Power
📦 godantic v1.4.0 — Precision & Power
Release Date: 2025-04-03
Author: Ismael GraHms
Tag: v1.4.0
🚀 Highlights
This release introduces advanced numeric and decimal validation, enabling more expressive constraints directly via struct tags. It marks a major milestone in making godantic a robust, production-ready validation library — with native support for common real-world scenarios like monetary values, pagination limits, and constrained ranges.
✨ New Features
🔢 Generic Range Constraints
minandmaxfor:- Strings (length)
- Slices (length)
- Numeric values
⚖️ Numeric Boundaries
gt/lt: Greater than / Less thange/le: Greater than or equal / Less than or equal
🎯 Multiples
multiple_of: Value must be a clean multiple of a given number (e.g.,0.05,100)
🧮 Decimal Precision
max_digits: Maximum total digits (before + after decimal)decimal_places: Maximum digits after decimal
☢️ Special Float Handling
allow_inf_nan: Accepts+Inf,-Inf, andNaNwhen explicitly enabled
🧪 Test Coverage
- ✅ Full unit tests for all new validation rules
- Edge case handling for:
- Negative numbers
- Floats with trailing/leading zeroes
- Empty/nil fields
- Boundary limits
📚 Documentation
- Updated README with:
- Full tag matrix
- Code examples
- Tag semantics and type compatibility