custom validation message
parent
d2a411d94c
commit
57790ff464
|
|
@ -1,4 +1,11 @@
|
|||
<form method="POST" action="/create">
|
||||
<input type="url" name="url" pattern="https?://.+" required placeholder="http://www.example.com/" style="padding: 0.5rem;" />
|
||||
<input type="url"
|
||||
name="url"
|
||||
pattern="https?://.+"
|
||||
required
|
||||
oninvalid="setCustomValidity('Enter a valid URL')"
|
||||
onvalid="setCustomValidity('')"
|
||||
placeholder="http://www.example.com/"
|
||||
style="padding: 0.5rem;" />
|
||||
<input type="submit" value="Submit" style="padding: 0.5rem;" />
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue