I’m writing a custom model field and would like it to come with a database CHECK

I’m writing a custom model field and would like it to come with a database CHECK constraint. The actual use case is DB validation of Django’s choices , to avoid invalid values (since the data can be edited from outside of Django).

What is your question? Post your code