How can I remove the default value _none in a select list? Created a content type and added a field "list(text)".
Under field settings marked the field as required.( Please make a note of an option for default value where the value is set to None by default).
Started creating content and given all the mandatory fields and left the value of the select-list field to default like 'select a default value' and try to submit the content.
The form gets submitted without HTML5 validation(i.e it is not showing a popup that the field is required to the user while filling the form.) but server side validation is in place so one can observe form error after submitting the form that field list is required.


Noticed the reason behind the HTML5 validation not working is the value for the option is a string '_none'.

How to remove the default value "_none" from select-list.
First unset the value like below.

unset($form['field_registration_type']['widget']['#options']['_none']);


Then set your drop down value to null, like below.

$form['field_registration_type']['widget']['#options'] = ['' =&gt; 'Select'] + $form['field_registration_type']['widget']['#options'];


Now your drop down value is null and your validation will work as expected.