Cómo agregar campos personalizados a modelos

I have added the custom fields and I am able to save them on the database in a custom table. However I want to make these custom fields mandatory both on client side and server side. On client side it is still relatively easy. On the server side is there a standard way to validate that all custom fields are filled and then only allow the topic creation to go through. Right now even if the custom fields are empty, the topic gets created without them.