Nova doesn't validate required task config fields

Extension configuration item options have a required field:

  • required : Whether the item requires a value to validate (default is false )

But, when a user is in “Edit task” UI, there is no visual indication a field is required, or if it’s required and empty, that it’s invalid. If fields are invalid, the “Done” button still works and allows the invalid config to be save in the workspace configuration. When the user runs the task with invalid config, there is no interruption of the task by Nova to display validation errors. It seems that there is no way in the JS API for extension authors to read the validity status of a configuration or specific config field. How are we supposed to prevent tasks running with empty/invalid fields?

To workaround this issue, I’m considering checking the values manually in the task action code, and if a value is invalid do nova.workspace.showErrorMessage("Invalid task config.") and return early.