Describe the feature and the current behavior/state.
Add the ability to define a function for a preference that will be called to validate the input value. This could be a new preference type or added to all of them. I feel this would be very useful for things such as external API tokens and would prevent the user from continuing to the extension that would fail if the token is incorrect.
Will this change the current api? How?
This is an addition and should be optional
Who will benefit with this feature?
Anyone that needs to have a valid preference value for the extension to run without error.