Has any one used validator on the news article app

Hi brand new to Anvil community. I’ve been working learning the ins and outs Anvil using the turtorials.
I’ve built the news aggregator. But the one thing I’ve encountered is that if a category isn’t selected I get the Nonetype error. So I was looking at how to make it a required field.

I found and have imported the validator, but it doesn’t seem to work on the Save and Cancel buttons.
Ideally I’d like to use the enable_when_valid() but I can’t figure out where to place it, or if it will work at all on those buttons since the are created on the fly.

I put a submit button on the ArticleEdit form the enable_when_valid() works on it.

I’m just curious if anyone has tried this. I’m pretty sure I’m missing something. I’ll share a the app for you to see once I figure out how to do that. :slight_smile: