controller.go
func (c *Controller) StrLenRange(fieldName string, p interface{}, n int, m int) string {
	if p == nil {
		p = ""
	}
	v, ok := p.(string)
	if ok == false {
		panic((&ValidationError{}).New(fieldName + "格式错误"))
	}
	length := utf8.RuneCountInString(v)
	if length > m || length < n {
		panic((&ValidationError{}).New(fieldName + "长度应该从" + strconv.Itoa(n) + "到" + strconv.Itoa(m)))
	}
	return v
}
func (c *Controller) StrLenRange(fieldName string, p interface{}, n int, m int) string {
	if p == nil {
		p = ""
	}
	v, ok := p.(string)
	if ok == false {
		panic((&ValidationError{}).New(fieldName + "格式错误"))
	}
	length := utf8.RuneCountInString(v)
	if length > m || length < n {
		panic((&ValidationError{}).New(fieldName + "长度应该从" + strconv.Itoa(n) + "到" + strconv.Itoa(m)))
	}
	return v
}
// StrLenRange param is a string, length range is [n,m]