aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/pages/adminIndex.jsp
diff options
context:
space:
mode:
authorcirakg <ciraboxkg@gmail.com>2023-01-04 17:29:50 +0100
committercirakg <ciraboxkg@gmail.com>2023-01-04 17:29:50 +0100
commitb0cf9f4b0c4eece41cb5e3542ab8c54f6dd3d32e (patch)
tree46508479c272d4b10b3febad3accf8a0d3b43b60 /src/main/webapp/pages/adminIndex.jsp
parentcd694d64cf1a9be635df6b15168a5950644e5ce2 (diff)
Dodate provere za unos.
Diffstat (limited to 'src/main/webapp/pages/adminIndex.jsp')
-rw-r--r--src/main/webapp/pages/adminIndex.jsp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/webapp/pages/adminIndex.jsp b/src/main/webapp/pages/adminIndex.jsp
index 25d021f..be5381f 100644
--- a/src/main/webapp/pages/adminIndex.jsp
+++ b/src/main/webapp/pages/adminIndex.jsp
@@ -85,15 +85,19 @@ request.setAttribute("monsters", monsters);
<br><br>
<h1>Registracija novog admina</h1>
<form method="post" action="registerAdmin.jsp">
- <input type="text" name="username"> Korisnicko ime
+ <input type="text" name="username" pattern="^[A-Za-z0-9]{1,}$" required> Korisnicko ime
<br>
- <input type="password" name="password">Sifra
+ <input type="password" name="password" pattern="^[A-Za-z0-9]{1,}$" required>Sifra
<br>
<p style="color:red;">
<%
if(request.getParameter("id")!=null &&request.getParameter("id").equals("-1") )
out.print("Username vec postoji");
%>
+ <%
+ if(request.getParameter("id")!=null &&request.getParameter("id").equals("-3") )
+ out.print("Username i password moraju biti alfanumericnog tipa");
+ %>
</p>
<p style="color:green;">
<%