gf/.example/util/gvalid/gvalid_custom_message.go

15 lines
237 B
Go

package main
import (
"context"
"fmt"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gvalid"
)
func main() {
g.I18n().SetLanguage("cn")
err := gvalid.Check(context.TODO(), "", "required", nil)
fmt.Println(err.String())
}