Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidForm ¶
func ValidForm(v interface{}) error
验证实例字段 use for example:
import user = &struct { Appid string `validate:"required,appid"` SN string `validate:"required,sn"` }{ SN: "102102000100008F", Appid: "TI1ZDE1NzJhZTEwO", } if err := rvalid.ValidField(user); err != nil { fmt.Println(err) rvalid.NewErrResp(-422, err.Error(), "") }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.