Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Validation on fields occurs for context reactions even if those reactions are not configured to be included for the context being edited. This is a drawback because it prevents decent validation from occurring.
To test:
- add #required => TRUE to a context reaction's form field
- Create a context that does not include that reaction
- Attempt to save the context
The form will not validate, stating that the field in the your reaction is required, despite that reaction not being configured for the context.
Ideally, the validation should only occur for enabled reactions.
Comments
Comment #1
guardiola86 CreditAttribution: guardiola86 commentedI'm having the same issue. I'm wondering if this is a bug in the module? I think marking a field in a context reaction as required should be possible.
Probably you don't remember after 5 years, but did you find a solution?
Comment #2
guardiola86 CreditAttribution: guardiola86 commented