mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2024-12-26 00:21:36 +01:00
Fix WiFi password max length check
The WiFi password cannot be longer than 63 symbols.
This commit is contained in:
parent
a1e9f23620
commit
048e686185
|
@ -82,6 +82,10 @@ export function validator(formData) {
|
|||
|
||||
if (device.password.length < 8)
|
||||
errors.password = _("Password must contain at least 8 symbols");
|
||||
if (device.password.length >= 64)
|
||||
errors.password = _(
|
||||
"Password must not contain more than 63 symbols"
|
||||
);
|
||||
|
||||
if (!device.guest_wifi.enabled) return errors;
|
||||
|
||||
|
@ -97,6 +101,10 @@ export function validator(formData) {
|
|||
guest_wifi_errors.password = _(
|
||||
"Password must contain at least 8 symbols"
|
||||
);
|
||||
if (device.guest_wifi.password.length >= 64)
|
||||
guest_wifi_errors.password = _(
|
||||
"Password must not contain more than 63 symbols"
|
||||
);
|
||||
|
||||
if (guest_wifi_errors.SSID || guest_wifi_errors.password) {
|
||||
errors.guest_wifi = guest_wifi_errors;
|
||||
|
|
Loading…
Reference in New Issue
Block a user