Include boolean flag for automatic Validation when constructing a `JointGridContainer` or even any Entity
We have a lot of ValidationUtils that check assets and participants for validity of attributes (can be called by ValidationUtils.check() for any entity and delegates to the respective method). It would be nice to be able to trigger them automatically when creating a JointGridContainer by for example including a boolean flag validate. Which could be set to False by default to not break existing code.
This could even be done for every entity.
Maybe the solution would be to make validation better known in the documentation?
If we want such a flag, I think it should not be used as a parameter to the constructor of JointGridContainer (constructors should just do what their name says), but as a flag in the methods that build the container.
Isn't it quite common in constructors to check the arguments that are passed for validity?
But I agree if we would pass that somehow as an argument we would have a single argument that isn't supposed to be an attribute of the object but a modification of the construction.
In any case we definitely should make that more popular. We do not even use it in Simona at the moment. -> https://github.com/ie3-institute/simona/issues/460
Ok reading more into what seems to be convention around constructors and validation, I'd be fine doing it in the constructor or close to it