Is there a way to validate a document against a collection's schema (including both built-in and custom field validations) in a simple way? Essentially, I'm looking for a method that replicates the validation process that occurs when publishing a document, but without the actual save operation.
Essentially can you create a field that updates as drafts are saved?:
{
name: 'isValid',
type: 'checkbox',
admin: {
readOnly: true,
},
}
I understand that you can do beforeChange hook and implement custom validation logic, but I just want to validate in the same way that payload is doing it and it would be so redundant to rewrite out all of that logic.
Maybe there is a much more simple method that I am missing?