From: Carl Worth <cworth@cworth.org>
Date: Thu, 8 Dec 2022 16:45:43 +0000 (-0800)
Subject: Validate numeric code before form is submitted
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=8e3fad5921ebab4830a713e012afdb83d557829b;p=zombocom-ai

Validate numeric code before form is submitted

The image generation script will reject any non-numeric seed as well
as any value larger than 2**32-1. So enforcing this up front at the
form will give the user a better experience.
---

diff --git a/index.html b/index.html
index 6bdd28b..59d87e1 100644
--- a/index.html
+++ b/index.html
@@ -64,7 +64,7 @@
             <label for="code">
               Numeric code:
             </label>
-            <input id="code" type="text" autocomplete="off" placeholder="(Leave blank for random)" />
+            <input id="code" type="number" min="0" max="4294967295" autocomplete="off" placeholder="(Leave blank for random)" />
           </div>
         </div>