Enthält sie wichtige Informationen, die unbedingt in die Model-class gehören?
Does it contain important information that really belongs in the model class?
Aber verstehen Sie mich nicht falsch, ich sage nicht, dass das Hinzufügen der Validierungslogik in die Model-class in jedem Fall eine gute Idee ist.
But don't get me wrong, I am not saying that putting the validation logic into the model class is always a good idea.
Der wichtigste Aspekt der drei Ansätze für Cross-field Validierung, die hier betrachtet wurden, ist, wohin sie die Validierungslogik setzen; in die Model-class oder in eine externe Validierungsklasse.
The most important aspect of the three approaches to cross-field validation considered here is where they put the validation logic; into the model class or into an external validator class.
Sie gehört zur Model-class, ist nicht wieder verwendbar und enthält viele wichtige Informationen.
It really belongs to the model class, is not reusable and contains a lot of important information.
Ich denke, wenn Sie eine dieser Fragen mit "Ja" beantworten, können Sie die Validierungslogik tatsächlich in die Model-class einfügen, ohne ein schlechtes Gewissen zu haben.
I think that if you can answer any of those questions with a 'yes' you can really put the validation logic into the model class without having to suffer a bad conscience.