make fields required in html

This commit is contained in:
maaa 2023-06-29 21:36:26 +02:00
parent 5c1113ff39
commit e9280b3b12
3 changed files with 6 additions and 6 deletions

View File

@ -22,9 +22,9 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<input name="username" type="text" placeholder="Username"> <input name="username" type="text" placeholder="Username" required>
<br><br> <br><br>
<input name="password" type="password" placeholder="Password"> <input name="password" type="password" placeholder="Password" required>
<br> <br>
<br> <br>
<button type="submit">Log in</button> <button type="submit">Log in</button>

View File

@ -35,10 +35,10 @@
<form method="post" enctype="multipart/form-data"> <form method="post" enctype="multipart/form-data">
<h2>Post</h2> <h2>Post</h2>
<p>Image</p> <p>Image</p>
<input type="file" name="file"> <input type="file" name="file" required>
<br> <br>
<p>Text</p> <p>Text</p>
<input name="title" type="text" placeholder="Text"> <input name="title" type="text" placeholder="Text" required>
<br><br> <br><br>
<input class="submit" type="submit" value="Post"> <input class="submit" type="submit" value="Post">
</form> </form>

View File

@ -23,9 +23,9 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endwith %} {% endwith %}
<input name="username" type="text" placeholder="Username"> <input name="username" type="text" placeholder="Username" required>
<br><br> <br><br>
<input name="password" type="password" placeholder="Password"> <input name="password" type="password" placeholder="Password" required>
<br><br> <br><br>
<button type="submit">Sign up</button> <button type="submit">Sign up</button>
<br><br> <br><br>