mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 21:53:48 +08:00
676d5fadab
We recently had a bug which caused auto-bumping to "not work". The problem was that the value had been set to 0.5, which when coerced to an integer turned into 0. So the feature is "working as intended", but there's a possibility of misconfiguration. When looking into this, I noticed that the inputs on the category settings page doesn't have any particular sanitisation in the front-end, and also one or two validations missing in the back-end. This change: - Takes an existing component, NumberField and enhances that by only allowing numeric input, essentially turning it into a managed input using the same approach as our PasswordField. - Changes the numeric inputs on category settings page to use this component. - Adds appropriate min constraints to the fields to disallow out-of-range values. - Adds missing back-end validations to relevant fields. |
||
---|---|---|
.. | ||
images | ||
javascripts | ||
stylesheets |