CMB2-Snippet-Library
CMB2-Snippet-Library copied to clipboard
"required" validation not working.
I tried to use the snippet for validation of required fields, but it doesn't seem to be working. I'm not getting any errors (front end or console). It just doesn't seem to be doing anything. I noticed that the last commit was 5 years ago. Has the snippet been tested with Gutenberg?
Very likely not, for the gutenberg testing.
We actually just had this same thing come up over at https://wordpress.org/support/topic/required-field-28/ in case that's not you as well. Basically the snippet as-is fails when it tries to select by #post because Gutenberg doesn't have that DOM element.
Ok thanks for the tip. I noticed that about the #post selector as well. I'll see if I can get it to work. Do you guys have any plans to update the snippet to work with Gutenberg? Or perhaps provide some other way of validating required fields?
Mostly a case of finding the time to update/test/etc. We more than willingly accept pull requests as well to account for the two different editor experiences, in case you find a good working solution on your own and want to pass it along.
Sounds good, if I find a solution I'll share.