Add validation for the provided enum class

Currently the form element for defining which PHP enum an enum field corresponds to is a simple text field. If you for any reason input an invalid value then there is no feedback anywhere. The only way to determine this is by checking out the default value configuration or trying to use the field on an entity. In both situations the form element will only allow a single empty value.

This adds validation to the field which shows an error message.

The actual check replicates the check from getOptions() but with more finegrained handling.

Closes #3586009

Merge request reports

Loading