Releases: pkg-id/goval
v0.2.0
Add String Variant Validator
This feature basically provides a simple StringValidator
for string variants (~string
). In the current latest version, if we need a validator for the type VariantExample string
, which is a string variant, we have to convert VariantExample
to a string
in order to use the StringValidator
. These changes add a new API that reuses the StringValidator
rules for string variants without any conversion.
Before:
type Variant string
const (
VariantA Variant = "A"
VariantB Variant = "B"
)
var validator = goval.String().In(string(VariantA), string(VariantB))
After:
type Variant string
const (
VariantA Variant = "A"
VariantB Variant = "B"
)
var validator = goval.StringVariant[Variant]().In(VariantA, VariantB)
Release v0.1.1
- Added internal error to fix error filter in
goval.Named
v0.1.0
Goval (Go Validator)
Goval aims to provide a user-friendly validation library that is easy to integrate, extend, and use.
It utilizes function composition for building complex validation logic and avoids reflection for improved performance.
It is designed to enhance the capabilities of Go functions and is safe for concurrent use.
✅ Reusable Validation Rules
Easily reuse validation rules across your codebase for consistent and efficient validation.
🔌 Extendable Validation Rules
Extend Goval with custom validation rules to suit your unique validation requirements.
🔧 Customizable Validation Rules
Customize validation rules with ease, making them adaptable to your specific needs.
🔗 Composable Validation Rules
Compose simple validation rules together to build complex validation logic using function composition.
🚫 No Reflection
Goval's reflection-free design ensures improved performance and reliability in your applications.
📝 Support for Customizable and Translatable Error Messages
Take control of error messages with customizable and translatable feedback for better user experience.
Upgrade your value validation game with Goval and ensure the reliability of your Go applications. Get started with Goval today! #golang #validation #opensource