Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Decimal & Numeric property editor with "minimum" set to 0 allows negative values, Maximum set to 10 allows values above 10 #16688

Open
liamlaverty opened this issue Apr 18, 2024 · 1 comment

Comments

@liamlaverty
Copy link
Contributor

liamlaverty commented Apr 18, 2024

Describe the bug
On the Decimal property editor, when Minimum is set to 0, a user can still set negative values. When the property's Maximum is set to 10, a user can still set the value to 50

The same bug exists in both the Numeric and Decimal property editors.

To Reproduce
Steps to reproduce the behavior:

  1. Fresh install the V14 RC
  2. Create a document type with a new Decimal property editor
  3. Configure its properties:
  • Minimum: 0
  • Maximum: 10
  • Step Size: 0.01
  • Allow Decimals: false
  1. Save the property & docype
  2. Create a new piece of content using the doctype
  3. Set the decimal value to -50 (or any negative value)
  4. Clicking save and publish incorrectly saves the document with -50, reloading the page returns -50

Note that the inverse behaviour also happens. The max value of 10 is also ignored, and I can enter 50 into the property.

Expected behavior
When minimum is set to 0, the lowest value the property should accept is 0. Negative values should return a validation error on Save and publish.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot shows the property editor configuration on the left. The right shows content using that editor with invalid data.

Screenshot 2024-04-18 at 14 23 14

Desktop (please complete the following information):

  • OS: macOS Sonoma 14.2.1 (23C71)
  • Browser MS Edge
  • Version 122.0

Additional context
Related to https://github.com/umbraco/Umbraco.CMS.Backoffice/issues/1660

@liamlaverty liamlaverty changed the title [BUG]: Decimal property editor with "minimum" set to 0 allows negative values [BUG]: Decimal property editor with "minimum" set to 0 allows negative values, Maximum set to 10 allows values above 10 Apr 18, 2024
@liamlaverty liamlaverty changed the title [BUG]: Decimal property editor with "minimum" set to 0 allows negative values, Maximum set to 10 allows values above 10 [BUG]: Decimal & Numeric property editor with "minimum" set to 0 allows negative values, Maximum set to 10 allows values above 10 Apr 18, 2024
@iOvergaard iOvergaard transferred this issue from umbraco/Umbraco.CMS.Backoffice Jun 27, 2024
Copy link

Hi there @liamlaverty!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants