-
-
Notifications
You must be signed in to change notification settings - Fork 177
Move validation logic to the Version class #7155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5f17e70
to
70b6480
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to also add Version::isValid($language)
.
@distantnative 👍 while refactoring this, I realized that we have two different ways to validate between |
ea53aa7
to
d107db5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastianallgeier This is indeed a weird split between ModelWithContent::errors()
and ModelWithContent::isValid()
. But it has been weird like this before, so no need to fix that right now with this PR.
Reasoning
We want to be able to validate individual versions before publishing them.
Changelog
Enhancements from previous betas
Version::errors()
methodVersion::isValid()
method, which is now used inModelWithContent::isValid()
instead of the Form class.Refactoring
VersionTest
andModelWithContentTest
ModelWithContent::isValid
unit testsBreaking changes
None
Docs
Ready?
For review team