atom / settings-view

🔧 Edit Atom settings
MIT License
272 stars 275 forks source link

have a way to programmatically validate a setting #613

Open devoncarew opened 9 years ago

devoncarew commented 9 years ago

Related to this issue: https://github.com/dart-atom/dartlang/issues/138. We'd like a way to be able to decorate a setting in the settings view with an error message. Perhaps this is exposed as a service which can validate settings? Or each setting might have a hidden property associated with it that the settings page can display. So if I have a dartlang.sdkLocation config setting, the settings page listens to a 'hidden' dartlang.sdkLocation._message setting, and displays it in the page if a message exists.

dirk-thomas commented 8 years ago

This would also be valuable for Hackafe/atom-sync-settings#153. Otherwise the package has to trim the value after getting it (but the wrong value stays in the config file). The package could write the trimmed value back but I would prefer to not let the package overwrite the settings but allow the setting to be validated on input already.

Is this considered to be implemented at some point? Or only if a PR is being provided?