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

Validation error if choice as object in list #92

Closed
minidron opened this issue Feb 17, 2023 · 2 comments
Closed

Validation error if choice as object in list #92

minidron opened this issue Feb 17, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@minidron
Copy link

Array validation support only flat choices. If use as object, get error "Invalid choice". django_jsonform/validators.py

{
  'type': 'list',
  'items': {
    'type': 'integer',
    'choices': [{
      'title': 'one',
      'value': 1
    }]
  }
}

Invalid choice

{
  'type': 'list',
  'items': {
    'type': 'integer',
    'choices': [1]
  }
}

No errors

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

bhch commented Feb 17, 2023

Thanks for reporting this. I'll release a fix soon.

@bhch bhch closed this as completed in c89f6b6 Mar 18, 2023
@bhch
Copy link
Owner

bhch commented Mar 25, 2023

The fix has been released in v2.16.0. Please update.

Thank you for reporting this bug.

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