validator V10的写法
func BookDate(fl validator.FieldLevel )bool{ if date,ok := fl.Field().Interface().(time.Time);ok{ today := time.Now() if date.Unix() > today.Unix(){ return true } } return false }
func BookDate(fl validator.FieldLevel )bool{ if date,ok := fl.Field().Interface().(time.Time);ok{ today := time.Now() if date.Unix() > today.Unix(){ return true } } return false }
2021-09-08
举报