How can I check if a user has selected something from a field in HTML5?
I see doesn\'t support the new
You need to set the value
attribute of option
to the empty string:
select
will return the value
of the selected option
to the server when the user presses submit
on the form
. An empty value
is the same as an empty text
input -> raising the required
message.
w3schools
The value attribute specifies the value to be sent to a server when a form is submitted.
Example