示例#1
0
文件: models.py 项目: marcusti/links
 def validate_name(self, field, value):
     assert not is_empty(value)
     assert len(value) <= 100
     if g.user:
         self.user = g.user
     return strip(value)
示例#2
0
文件: models.py 项目: marcusti/links
 def validate_email(self, field, value):
     assert not is_empty(value), '"%s" may not be empty.' % field
     return strip(value)
示例#3
0
文件: models.py 项目: marcusti/links
 def validate_openid(self, field, value):
     return strip(value)
示例#4
0
文件: models.py 项目: marcusti/links
 def validate_url(self, field, value):
     assert not is_empty(value), '"%s" may not be empty.' % field
     if g.user:
         self.user = g.user
     return strip(value)