Releases: muonsoft/validation
Releases · muonsoft/validation
v0.9.0
Big update to generics with lots of breaking changes
- arguments and constraints refactored
generic
package with reflection removed- some updates for constraints in
it
package
See all updates in pull request https://github.com/muonsoft/validation/pull/71/files
v0.8.0
- added conditional validation based on validation groups
it.IsNumeric()
andit.IsInteger()
constraints added- barcode validation for EAN-8, EAN-13, UPC-A and UPC-E added
- added functions
EAN8
,EAN13
,UPCA
andUPCE
into packagesis
andvalidate
- added constraints
it.IsEAN8()
,it.IsEAN13()
,it.IsUPCA()
andit.IsUPCE()
- added functions
- bugfix: zero time check by
time.IsZero()
instead of comparing with emptytime.Time
v0.7.0
- minor BC break message template consts replaced by map in
message
package validation.CheckNoViolations()
argument added to append violations from error- fluent assertion functions in
validationtest
package (seevalidationtest.Assert()
), older functions now are deprecated:validationtest.AssertIsViolation
validationtest.AssertIsViolationList
validationtest.AssertOneViolationInList
v0.6.0
- Violation message translator moved to
translations
package (closes #62 dynamic translations) validation.Translator
struct replaced by interface (this might be minor BC break)validation.SetTranslator
option added to override internal translatorvalidator.SetUp()
method to recreate singleton translator introducedvalidator.SetOptions()
andvalidator.Reset()
now are deprecated (usevalidator.SetUp()
instead)
v0.5.3
Ability to run build-in constraints conditionally by using When()
method:
validation.Checker
validation.SequentialConstraint
validation.AtLeastOneOfConstraint
validation.CompoundConstraint
v0.5.2
validation.Check()
andvalidation.CheckProperty()
arguments added for quick validation based on boolean expressionsvalidationtest.AssertOneViolationInList()
function added
v0.5.1
is.Integer
andis.Number
functions added to test strings against numerics- docs updated with runnable example
v0.5.0
- BC break Signature of
validator.Validate()
andvalidator.BuildViolation()
changed: now it requirescontext.Context
as the first argument. - BC break Signature of
Validatable
interface metodValidate()
changed: now it requirescontext.Context
as the first argument. - BC break Method
validator.WithContext()
and argumentvalidation.Context()
were removed. - BC break Signature of arguments
validation.String()
,validation.Bool()
,validation.Time()
changed alongside with alias methodsvalidator.ValidateString()
,validator.ValidateBool()
,validator.ValidateTime()
- now it accepts non-pointer arguments. Use newly added argumentsvalidation.NilString()
,validation.NilBool()
,validation.NilTime()
as a replacement.
v0.4.1
is.StringInList
function addedscope.AtIndex()
andscope.AtProperty()
now are exported and can be used outside of the package
v0.4.0
it.NotNilConstraint
andit.NilConstraint
now implementsvalidation.BoolConstraint
and supports boolean arguments for validationvalidation.StringsConstraint
interface added for validating slice of stringsit.UniqueConstraint
added to validate slice of strings for uniquenessmuonsoft/language
package dependency updated to v0.3