Documentation ¶
Index ¶
Constants ¶
View Source
const ( ValidatorParamsCheckFailCode int = -400300 ValidatorParamsCheckFailMsg string = "参数校验失败" // 表单参数验证器未通过时的错误 ErrorsValidatorNotExists string = "不存在的验证器" ErrorsValidatorTransInitFail string = "validator的翻译器初始化错误" ErrorNotAllParamsIsBlank string = "该接口不允许所有参数都为空,请按照接口要求提交必填参数" ErrorsValidatorBindParamsFail string = "验证器绑定参数失败" )
Variables ¶
View Source
var Trans ut.Translator
Trans 定义一个全局翻译器T
Functions ¶
func RemoveTopStruct ¶
RemoveTopStruct 将返回的结构体名去除掉,只留下需要的字段名
func ValidatorError ¶
ValidatorError 翻译表单参数验证器出现的校验错误
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.