mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 11:58:27 +00:00
Why this change? This is a continuation of a30d73f255879f3e4cc0edbb9de358c03f3aed94 In our schema, we support the `min` and `max` validation rules like so: ``` some_objects_setting type: objects schema: name: some_object properties: id: type: float validations: min: 5 max: 10 ``` While the validations used to validate the objects on the server side, we should also add client side validation for better UX. What does this change do? Since the integer and float input fields share very very similar logic in the component. This commit pulls the common logic into `admin/components/schema-theme-setting/number-field.gjs` which `admin/components/schema-theme-setting/types/integer.gjs` and `admin/components/schema-theme-setting/types/float.gjs` will inherit from.