discourse/app/assets/javascripts/admin
Alan Guo Xiang Tan 2d867aa8e5
DEV: Add validation message to float fields in theme object editor (#26285)
Why this change?

This is a continuation of a30d73f255

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.
2024-03-21 15:33:38 +08:00
..
addon DEV: Add validation message to float fields in theme object editor (#26285) 2024-03-21 15:33:38 +08:00
app
.npmrc
ember-cli-build.js DEV: Update ember-cli to 4.12.0 (#21074) 2023-04-19 12:58:29 +02:00
index.js DEV: invert admin/wizard build logic (#22520) 2023-07-10 22:07:21 +01:00
package.json Build(deps): Bump the babel group with 2 updates (#26272) 2024-03-21 07:03:29 +08:00