Exemplo n.º 1
0
 def validate(value):
     if len_cn(value) <= length:
         return True
     raise Exception(u'%s最大字符长度不能超过' + str(length))
Exemplo n.º 2
0
 def validate(value):
     if len_cn(value) >= length:
         return True
     raise Exception(u'%s最少字符长度不能少于 %s' % length)