- Issue created by @goz
- @goz opened merge request.
- πΊπΈUnited States clayfreeman Paragould, AR
This module does not intend to make it possible to set a field as optional when it's already required. Doing so would likely lead to adverse side effects (e.g., implicit
NotNull
constraint validation errors). On the other hand, making an optional field required for specific form modes is safe because it only has implications when rendering the field widget on the form.If the option to mark a field as "Required" in the form display is appearing when it shouldn't be, I'd happily accept a patch to fix that. I'd also accept any suggestions you may have for updating the project description to clarify this design choice should you believe it to be necessary.
I'm closing this issue in the mean time.
- π«π·France goz
Thank you for your quick answer.
I effectively saw this logic (from code and tests). That's why i suggested to add in description a warning that a default value should be defined in case required was originally TRUE.Can you at least check "required" works ? As i explain in the issue,
!empty($settings['required'])
will always return FALSE except if there is no required key in the array, so definition will never be overriden.