Skip to content

Releases: pkg-id/goval

v0.2.0

30 Jun 13:48
84da936
Compare
Choose a tag to compare

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

20 May 09:24
8d929d2
Compare
Choose a tag to compare
  • Added internal error to fix error filter in goval.Named

v0.1.0

15 Apr 05:30
32a45d0
Compare
Choose a tag to compare

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