Added completed user. Some fixes and more more more...
This commit is contained in:
parent
b96dd39795
commit
ea8ab7c0ed
33 changed files with 576 additions and 212 deletions
21
internal/utils/inline_list_validator.go
Normal file
21
internal/utils/inline_list_validator.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
)
|
||||
|
||||
func InlineListValidator(fl validator.FieldLevel) bool {
|
||||
str, ok := fl.Field().Interface().(string)
|
||||
|
||||
if ok {
|
||||
for _, char := range str {
|
||||
if strings.ContainsRune(";", char) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue