support account color

This commit is contained in:
MaysWind
2020-11-17 01:54:26 +08:00
parent 391588fdf6
commit b4bd83e7a0
13 changed files with 153 additions and 9 deletions
+17
View File
@@ -0,0 +1,17 @@
package validators
import (
"github.com/go-playground/validator/v10"
"github.com/mayswind/lab/pkg/utils"
)
func ValidRGBColor(fl validator.FieldLevel) bool {
if value, ok := fl.Field().Interface().(string); ok {
if utils.IsValidRGBColor(value) {
return true
}
}
return false
}