How to make custom URL mandatory? I'd like to force users to customize URL. How to make the following field mandatory?
The path alias is a field, so you just need to alter the form and set the #required property on the element:

function module_form_node_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {
  $form['path']['widget'][0]['alias']['#required'] = TRUE;
}