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

Cannot Access min_selection and max_selection Validation Properties #133

Open
AdamHornibrook-Nice opened this issue Feb 6, 2025 · 0 comments

Comments

@AdamHornibrook-Nice
Copy link

AdamHornibrook-Nice commented Feb 6, 2025

Description

Unable to get validation values for question type multiple_choice. When multiple selection option is set on this question type, a number of options the user must select can be set. The validation JSON retrieved from https://api.typeform.com/forms for this question type when this option is set is coming back something like this:

"validations": {
  "required": true,
  "min_selection": 1,
  "max_selection": 5
},

The values min_selection and max_selection are not defined as valid properties in the library. The Validations interface specifies having min_value and max_value properties, but no min_selection and max_selection.

Expected Behavior

The min_selection and max_selection values should be added to the Validations interface, or, if these aren't really different than the value concept, the API response could change the response to min_value and max_value like all the other question types.

Current Behavior

The properties min_selection and max_selection are not recognized by the compiler.

Steps to Reproduce

Pull client version 2.4.4 and try to use it to access the min_selection and max_selection properties.

Screenshots

Image

Your Environment

  • Client Version: 2.4.4
  • Node.js Version: 20.17.0
  • NPM Version: 10.8.2
  • Browser Name and Version: Chrome 132.0.6834.160
  • Operating System and Version: Mac Sequoia 15.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant