mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-04-20 08:16:38 +02: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)
|
if (device.password.length < 8)
|
||||||
errors.password = _("Password must contain at least 8 symbols");
|
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;
|
if (!device.guest_wifi.enabled) return errors;
|
||||||
|
|
||||||
@ -97,6 +101,10 @@ export function validator(formData) {
|
|||||||
guest_wifi_errors.password = _(
|
guest_wifi_errors.password = _(
|
||||||
"Password must contain at least 8 symbols"
|
"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) {
|
if (guest_wifi_errors.SSID || guest_wifi_errors.password) {
|
||||||
errors.guest_wifi = guest_wifi_errors;
|
errors.guest_wifi = guest_wifi_errors;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user