verbb / events

Craft CMS Plugin for events management and ticketing.
Other
22 stars 13 forks source link

Add error state to the Date/Time tab if a field has errors. #113

Closed anchovy closed 2 years ago

anchovy commented 2 years ago

v1.4.23 added Date/Time validation but didn't include adding the error state to the tab. This PR adds the error state if one of the fields has an error.

engram-design commented 2 years ago

Thanks, but any reason to not just use $event->hasErrors() rather than checking each attribute?

anchovy commented 2 years ago

No, just didn't think of that, would be the best solution. Want me to update?

engram-design commented 2 years ago

Nah, after a 2s thought, probably best to check for this, as you're adding an error to the specific tab, so you'll want to check for errors only on things in the tab. You've done the right thing!