In Kentico 13, if your dropdown field is not showing an error message when left unselected, even though it is marked as required, you might need to ensure a few things:
Validation Rules in Kentico: Verify that the dropdown field is properly set as required in the Kentico Form Builder. Sometimes, required field settings might not translate correctly into the frontend validation. Ensure that the "Required" property is enabled for the dropdown field in the form settings.
Default Option: Ensure that the default option in your dropdown () does not count as a valid choice. It might be useful to change this to a non-selectable placeholder like . This way, users will have to select a valid option from the dropdown, rather than just submitting with the default option.
Client-Side Validation: Check if client-side validation scripts are properly included and functioning on your page. Kentico forms usually use jQuery Validation for client-side validation. Ensure that your page includes the necessary scripts and that they are working correctly.
Form Configuration: Make sure there are no custom scripts or configurations overriding the default validation behavior for dropdown fields. Custom JavaScript might inadvertently bypass or disable validation.
Validation Message Placeholder: Ensure that the field-validation-valid div is correctly associated with your dropdown field. The data-valmsg-for attribute should match the name attribute of the dropdown field. If there’s a mismatch or if the validation message is not appearing, it might be due to incorrect or missing configuration.
You might need to test these adjustments and see if the validation behavior changes. If issues persist, checking the Kentico documentation or reaching out to Kentico support could also provide more tailored guidance.