cuny-academic-commons / commons-in-a-box

Commons In A Box - A suite of community and collaboration tools for WordPress, designed especially for academic communities
http://commonsinabox.org
72 stars 14 forks source link

Validation for Course Description fails #363

Closed arto-a closed 3 years ago

arto-a commented 3 years ago

I was testing the following site: https://openlabdev.commonsinabox.org/groups/hegel-and-marx-logical-studies/

Originally, there was a course description entered in the "Description (required)" field.

I deleted the entered text and clicked "Save Changes". The page updated and reloaded without throwing any errors for the missing course description.

I have included a screenshot of the empty Description box, following the page update. Screenshot from 2021-07-22 14-56-00

boonebgorges commented 3 years ago

In https://github.com/cuny-academic-commons/openlab-theme/issues/250, we implemented a workaround that allowed form submission with an empty Description field, to avoid the fact that JS required validation is more strict regarding whitespace than BP's server-side validation. I've changed this logic so that the clikent-side validation requires a non-empty/whitespace string.

arto-a commented 3 years ago

This is now fixed. Thanks!

boonebgorges commented 3 years ago

Thanks!