With the new Settings Definition API, after inputting a number that is outside the defined range, if the then user corrects the value to be inside the range, the warning is not cleared.
Steps to reproduce:
-
Add a control element of type
numberto your setting panel
(For example using snippet from Docs - Settings#Number){ name: 'Cache size (MB)', control: { type: 'number', key: 'cacheMb', min: 1, max: 500, defaultValue: 50 }, }
-
In the rendered settings panel, change the value to a negative number and click outside the input element to trigger validation (eg.
-1) -
A warning will display
Value must be at least 1as expected.
-
Change the value back to a positive number within the valid range and click outside the input element to trigger validation (eg.
99) -
Observe that the previous warning remains.
-
Optional; Confirm data has been saved in plugins
data.jsonfile
Note, the input is not saved in step 2 due to failed validation, however it is in step 4 when the input is valid (as expected).

