don't publish custom post type post if a meta data field isn't valid
A custom post type is being developed in wordpress. It is needed that some fields should be made mandatory. Is there a method in Api using which posts fields could be made mandatory? Or it would need to be done using custom code?
I am making a custom post type for an Event. Now when creating a new Event it is mandatory that the user enters the date, otherwise it should not allow to save him the event.