Ensure wifi password field accepts 8 characters

This commit is contained in:
Ana Custura 2026-03-31 11:07:30 +01:00
parent e0c30040bc
commit 585458986f

View file

@ -15,7 +15,7 @@ def hostname_check(form, field):
def wifi_length_check(form, field): def wifi_length_check(form, field):
if len(field.data) > 63: if len(field.data) > 63:
raise ValidationError(_l('Wifi password cannot be longer than 63 characters.')) raise ValidationError(_l('Wifi password cannot be longer than 63 characters.'))
if len(field.data) in range(1,9): if len(field.data) in range(1,8):
raise ValidationError(_l('Wifi password cannot be shorter than 8 characters.')) raise ValidationError(_l('Wifi password cannot be shorter than 8 characters.'))
class LoginForm(FlaskForm): class LoginForm(FlaskForm):