Releases: shariarfaisal/validator
Releases · shariarfaisal/validator
Enum logical bugfix
v1.6.0 bugfix: enum logical bugfix
Bugfix: Empty string unchecked for rest of the fields
Empty string unchecked from the condition.
If any value is required, then there must have to be added required condition in tags.
Bugfix: Empty string unchecked
Empty string unchecked from the condition.
If any value is required, then there must have to be added required condition in tags.
Logical bug fixes and code refactor
v1.3.0 ref: code refactor and logical bug fixed
Issue resoved
error property name was replaced by the title
Nested items validation failed issue fixed
v1.2.0 bugfix: nested items validation issue fixed
Struct tag title could be use as name of error message name instead of json name
v1.1.2 feat(title): Tag title will be use as name of error messages
Child items validation & Error messages update
Child items validation feature added if the value type is string or int for Map and Slice data types which was missing in the previous release
Example
type Dice struct {
Point []int `v: "item.min=1;item.max=6"`
}
Tag key value separator update
Struct tag key-value separator updated clone(:) to equal (=) sign
// Before
type Student struct {
GPA float32 `v:"gt:0;lt:5"`
}
// After
type Student struct {
GPA float32 `v:"gt=0;lt=5"`
}
Bugfix: json name alternative default name added
Bug Fixed
There was an issue with the error property name. If the JSON tag is not added to the struct tag then the error key returns an empty string. This issue was solved in this release by replacing it with the default struct name.
Update
eq and ne also works for strings value which was missing in the previous release