mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-14 18:50:04 +00:00
added default ip, regex for version names
This commit is contained in:
parent
0201f11333
commit
1c2cf41e97
@ -196,8 +196,7 @@ function validateVersionSave(modalName) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
matchingVersions.length > allowedMatches ||
|
matchingVersions.length > allowedMatches ||
|
||||||
nameInput.value.length < parseInt(nameInput.getAttribute("minlength")) ||
|
!(new RegExp(nameInput.getAttribute("pattern"))).test(nameInput.value)
|
||||||
nameInput.value.length > parseInt(nameInput.getAttribute("maxlength"))
|
|
||||||
) {
|
) {
|
||||||
nameInput.classList.add("invalidinput");
|
nameInput.classList.add("invalidinput");
|
||||||
valid = false;
|
valid = false;
|
||||||
|
@ -266,6 +266,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
id="addserver-ipinput"
|
id="addserver-ipinput"
|
||||||
placeholder="127.0.0.1:23000"
|
placeholder="127.0.0.1:23000"
|
||||||
|
value="127.0.0.1:23000"
|
||||||
required=""
|
required=""
|
||||||
pattern="^([-a-zA-Z0-9]+\.)+[-a-zA-Z0-9]+:[0-9]+$"
|
pattern="^([-a-zA-Z0-9]+\.)+[-a-zA-Z0-9]+:[0-9]+$"
|
||||||
oninput="validateServerSave('add')"
|
oninput="validateServerSave('add')"
|
||||||
@ -588,8 +589,7 @@
|
|||||||
id="addversion-nameinput"
|
id="addversion-nameinput"
|
||||||
placeholder="custom-build-000"
|
placeholder="custom-build-000"
|
||||||
required=""
|
required=""
|
||||||
minlength="1"
|
pattern="^[-a-zA-Z0-9_]{1,70}$"
|
||||||
maxlength="70"
|
|
||||||
oninput="validateVersionSave('add')"
|
oninput="validateVersionSave('add')"
|
||||||
/><label for="addversion-urlinput"
|
/><label for="addversion-urlinput"
|
||||||
>Version URL</label
|
>Version URL</label
|
||||||
@ -655,8 +655,7 @@
|
|||||||
id="editversion-nameinput"
|
id="editversion-nameinput"
|
||||||
placeholder="custom-build-000"
|
placeholder="custom-build-000"
|
||||||
required=""
|
required=""
|
||||||
minlength="1"
|
pattern="^[-a-zA-Z0-9_]{1,70}$"
|
||||||
maxlength="70"
|
|
||||||
oninput="validateVersionSave('edit')"
|
oninput="validateVersionSave('edit')"
|
||||||
/><label for="editversion-urlinput"
|
/><label for="editversion-urlinput"
|
||||||
>Version URL</label
|
>Version URL</label
|
||||||
|
Loading…
Reference in New Issue
Block a user