Credit card fields still required when a $0 option is selected on event registration/contribution page
When submitting an event registration (or contribution page form) with a $0 price option selected the form fails validation, despite credit card fields being hidden. I noticed this on a CiviCRM website I manage, reproduced on the circle interactive demo site, also @KarinG reproduced this on yet another site.
- Go to an event registration page (or contribution page)
- Select $0 price option
- Submit form
Credit card fields should not be required when they're hidden.
- Browser: Chrome 84.0.4147.89
- CiviCRM: 5.28.0
- PHP: 7.2.31
- CMS: Drupal 7.72
- Database: MySQL 5.7.31
- Web Server: _Apache 2.4.46
Works as intended on CiviCRM 5.26.2 but not 5.28.0