query_list_user_request.go
413 字节
package user
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type ListUserRequest struct {
}
func (ListUserRequest *ListUserRequest) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(ListUserRequest)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}