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

Error message for uniqueItems is not readable #117

Closed
maciejpolanczyk opened this issue Aug 9, 2023 · 2 comments
Closed

Error message for uniqueItems is not readable #117

maciejpolanczyk opened this issue Aug 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@maciejpolanczyk
Copy link

maciejpolanczyk commented Aug 9, 2023

Error message for uniqueItems is not shown below/next to the field. In addition current error message is unclear.
Current state:
Screenshot 2023-08-09 at 11 06 46

Code:

class ShoppingList(Model):
    data = JSONField(
        schema={
            "type": "array",
            "items": {
                "type": "string"
            },
            "uniqueItems": True
        }
    )

admin.site.register(ShoppingList)

Expected state: show clear message next to the field

Used:
django = "==4.2.3"
django-jsonform = "==2.18.0"

@bhch bhch added the bug Something isn't working label Aug 9, 2023
@bhch
Copy link
Owner

bhch commented Aug 9, 2023

It's strange because the validator (in lines: 167–176) does add a clear error message for this case.

But thank you for reporting the bug. It will be fixed soon in the next release.

@bhch bhch closed this as completed in 171aa70 Aug 12, 2023
@bhch
Copy link
Owner

bhch commented Aug 13, 2023

Fixed in v2.19.0. Please upgrade and test it out.

Thank you.

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

No branches or pull requests

2 participants