controller.go
func (c *Controller) StrIn(fieldName string, p interface{}, l ...string) string {
	if p == nil {
		p = ""
	}
	v, ok := p.(string)
	if ok == false {
		panic((&ValidationError{}).New(fieldName + "格式错误"))
	}
	b := false
	for i := 0; i < len(l); i++ {
		if l[i] == v {
			b = true
		}
	}
	if b == false {
		panic((&ValidationError{}).New(fieldName + "值应该在" + strings.Replace(strings.Trim(fmt.Sprint(l), "[]"), " ", ",", -1) + "中"))
	}
	return v
}
func (c *Controller) StrIn(fieldName string, p interface{}, l ...string) string {
	if p == nil {
		p = ""
	}
	v, ok := p.(string)
	if ok == false {
		panic((&ValidationError{}).New(fieldName + "格式错误"))
	}
	b := false
	for i := 0; i < len(l); i++ {
		if l[i] == v {
			b = true
		}
	}
	if b == false {
		panic((&ValidationError{}).New(fieldName + "值应该在" + strings.Replace(strings.Trim(fmt.Sprint(l), "[]"), " ", ",", -1) + "中"))
	}
	return v
}
// StrIn param is a string, the string is in array