verbb / events

Craft CMS Plugin for events management and ticketing.
Other
21 stars 12 forks source link

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

Closed anchovy closed 1 year 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 1 year ago

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

anchovy commented 1 year ago

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

engram-design commented 1 year 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!