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 %}
{% endif %}
{% endwith %}
<input name="username" type="text" placeholder="Username">
<input name="username" type="text" placeholder="Username" required>
<br><br>
<input name="password" type="password" placeholder="Password">
<input name="password" type="password" placeholder="Password" required>
<br>
<br>
<button type="submit">Log in</button>

View File

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

View File

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