Esempio n. 1
0
 def validate_password(form, field):
     user = User.get_by_id(current_user.id)
     if not user.check_password(field.data):
         raise ValidationError(_("Password is wrong."))
Esempio n. 2
0
 def validate_password(form, field):
     user = User.get_by_id(current_user.id)
     if not user.check_password(field.data):
         raise ValidationError(_("Password is wrong."))
Esempio n. 3
0
 def validate_name(form, field):
     user = User.get_by_id(current_user.id)
     if not user.check_name(field.data):
         raise ValidationError(_("Please pick another name."))
Esempio n. 4
0
 def validate_name(form, field):
     user = User.get_by_id(current_user.id)
     if not user.check_name(field.data):
         raise ValidationError(_("Please pick another name."))