Hello. Im currently working on Publish schedule based on docs. The problem i have is that i need to validate if all of required fields are filled.
I currenly added a Button in Header buttons (near Publish, save etc) “Schedule Publish” which correctly set publish_at_date in my article model.
How to run validation for My article model when user Click on This button?
i tried to use methods defined in useContentManagerEditViewDataManager triggerFormValidation and checkFormErrors but those are not working or i use them wrongly.
if (!entry) {
//handle if already deleted
throw new NotFoundError(
`Entry ID: ${params.where.id} not found / already deleted!`
);
} else if (entry.status === CollectionStatus.SUBMITTED) {
throw new ApplicationError(
`Entry with status: ${CollectionStatus.SUBMITTED} cannot be deleted!`,
{}
);
}
},
};
i got same problem, here’s my code i want trigger form validation on lifecycle before create how to do it?
lifecycle happen to late to stop it aka if you where to stop it from updating in a lifecycle all components would still update. Only fix to this to my knowledge is a entity service decorator who are not documented.