How do I add a "Please select"/ "none" option to a required select input in a form? I cant find anything about that in the drupal 8 form api on how to add an option "Please select" to a select element. The form item is mandatory so you must select something. Of course, selecting "Please select" should invalidate.

$select['#options'] = $options;
$select['#required'] = true;
As they explain in the documentation URL provided in your question you should add the #empty_option or #empty_value property to the render array of the select button.


#empty_option: (optional) The label to show for the first default option. By default, the label is automatically set to &quot;- Select -&quot; for a required field and &quot;- None -&quot; for an optional field.
#empty_value: (optional) The value for the first default option, which is used to determine whether the user submitted a value or not.

If #required is TRUE, this defaults to '' (an empty string).
If #required is not TRUE and this value isn't set, then no extra option is added to the select control, leaving the control in a slightly illogical state, because there's no way for the user to select nothing, since all user agents automatically preselect the first available option. But people are used to this being the behavior of select controls.
If #required is not TRUE and this value is set (most commonly to an empty string), then an extra option (see #empty_option above) representing a &quot;non-selection&quot; is added with this as its value.