- Issue created by @tgauges
I want the required error message from the Conditional Fields module to be consistent with the rest of the framework.
This module can conditionally set a field as required. This is not validated in the browser via an HTML attribute but also in the backend.
Currently the required error message is '%name is required.'
introduced in
#2833368: Fix conditionally required fields message and label →
. The relevant code is src/ConditionalFieldsFormHelper.php:623.
Drupal core uses '@name field is required.'
as default required error message. This can be seen in core/lib/Drupal/Core/Form/FormValidator.php:299.
The message from Drupal core is also used at multiple places.
field_dependee
.field_dependent
.field_dependent
becomes required when field_dependee
has no value.field_dependee
and field_dependent
to be identicalUse the Drupal required error message.
The required error messages are consistent.
None.
None.
Active
4.0
Code