Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
Some UI components have access to data that allows richer validation than can be performed purely at the model layer. Invalid components should be able to dispatch an event that parent components take into account when decided overall form validation state.
In particular, QueueSettingsEditor knows how to validate max queue values (like max nodes), but Experiment.validate() doesn't have access to the queue information to be able to run this kind of validation. If the QueueSettingsEditor is invalid it should dispatch an event that the ComputationalResourceSchedulingEditor listens for and likewise dispatches an invalid event that the ExperimentEditor will get and use to determine that the overall form validation state is also invalid.
In general, Model.validate() should only be used to validate the local values on that model instance instead of recursively calling validate() on child models. Aggregating validation state should be handled at the UI component level.