I'm assuming that this is a problem in Date Views.
I have a View where the user can filter on a "Date" type field in content. I want to make the date an exposed filter, but oblige the user to enter a value for the filter. Although I have clicked on the "required" setting, the View runs anyway without any problem.

CommentFileSizeAuthor
#1 date-2536860-1.patch817 bytesvaibhavjain
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vaibhavjain’s picture

Status: Active » Needs review
FileSize
817 bytes

The reason it does not work is because, #type is not added to the form element, instead added to a prefix, like min / max. This is by default, so I feel like this will be same issue, if there is a single date field.
In views, if #type exists, then only views code take certain actions, including the required setting.
I believe, because of this, there may be many more issues which may be occuring.

Adding the patch, which works well for me, however, there can be a better way of doing this.

Thanks

DamienMcKenna’s picture

Version: 7.x-2.8 » 7.x-2.x-dev