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.
Problem/Motivation
When the form gets reloaded by ajax, the date field's required value is reset to FALSE. This way there's no error set on the validation.
Proposed resolution
Altering the date_field_validate function, checking if the field is empty, if so, add error.
Remaining tasks
- See if this is the best way of working
- Testing
Comment | File | Size | Author |
---|---|---|---|
#2 | date-required-reset-2940983-1-D7.patch | 996 bytes | nickmans |
Comments
Comment #2
nickmans CreditAttribution: nickmans at The Reference commentedI altered the date_field_validate function to alternatively check if the value is set.
Comment #3
nickmans CreditAttribution: nickmans at The Reference commentedComment #4
DamienMcKennaThanks for the patch, we'll try to review it soon.
BTW when you upload a patch it helps to set the status to "needs review", that triggers the testbots and lets others know that there's something review.