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

Incorrect validation in data grid editor #4037

Open
khurry opened this issue Dec 28, 2024 · 2 comments
Open

Incorrect validation in data grid editor #4037

khurry opened this issue Dec 28, 2024 · 2 comments
Labels
triage Issue is waiting for triage type: bug Something isn't working

Comments

@khurry
Copy link

khurry commented Dec 28, 2024

Environment

Jmix version: 1.6.2

Bug Description

We want to restrict fraction digit number of some BigDecimal entity field so we annotate it with @Digits and @NumberFormat.
When we enter non-valid value in DataGrid editor the value is represented as rounded but validation fails.

Steps To Reproduce

  1. Create an entity with BigDecimal field annotated with @digits and @numberformat
    image

  2. Open an entity instance in DataGrid editor and add incorrect value, for example 123.123

  3. The value is rounded but validation fails:
    image

Current Behavior

Seems like validation checks internal value which is not rounded. That's why it fails.

Expected Behavior

Internal value is rounded so validation runs without errors.

@khurry khurry added triage Issue is waiting for triage type: bug Something isn't working labels Dec 28, 2024
@glebfox
Copy link
Contributor

glebfox commented Jan 10, 2025

Hi,

What if you set precision and scale in the column definition, e.g. @Column(name = "TEST", precision = 10, scale = 2)? If this is not the case, could you please describe in more detail yours.

@khurry
Copy link
Author

khurry commented Jan 10, 2025

Hi, it gives no effect, validation still fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issue is waiting for triage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants