Beispiel #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."))
Beispiel #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."))
Beispiel #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."))
Beispiel #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."))