mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
add comments
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
// NotBlank returns whether the given content is not blank
|
||||
func NotBlank(fl validator.FieldLevel) bool {
|
||||
if value, ok := fl.Field().Interface().(string); ok {
|
||||
if value != "" && strings.Trim(value, " ") != "" {
|
||||
|
||||
Reference in New Issue
Block a user