I have a messaging class, in which I validate if any required field is empty or business rules which information by a string variable reaches the presentation.
public class Mensajeria
{
Resto de código
}
My question is by implementing CustomException I can do the same and if the answer is yes how would the message get to the presentation layer having to go through the ApplicationService layer.
If you are going to apply business rule validations, use a framework that helps you, such as
FluentValidation
Then you could apply validation rules indicating which fields can be empty.
When executing the validations you will get the list of errors. Do not invent the wheel, there are already libraries that allow you to apply validations in business entities.
You define the validation rules
you execute the validations
and finally you take the error messages if any occur
Then you can return the list of messages or you could return an Exception containing the strings of these messages. I would recommend that you return an exceltion, what's more this framework supports it if you use
from the UI you simply catch the exception with a try..catch