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

Prototype with choices - impossible? #22

Closed
OnkelTem opened this issue Apr 22, 2019 · 3 comments
Closed

Prototype with choices - impossible? #22

OnkelTem opened this issue Apr 22, 2019 · 3 comments

Comments

@OnkelTem
Copy link

I cannot declare a schema with prototype of choices.

              'process' => [ '_type' => 'prototype', '_required' => TRUE, '_min_items' => 1, '_prototype' => [
                '_type' => '_choice', '_required' => TRUE, '_choices' => [
                  0 => [ '_type' => 'array', '_required' => FALSE, '_ignore_extra_keys' => TRUE, '_children' => [
                    'plugin' => [ '_type' => 'text',  '_required' => TRUE ],
                  ]],
                  1 => [ '_type' => 'prototype', '_required' => FALSE, '_min_items' => 1, '_prototype' => [
                    '_type' => 'array', '_required' => FALSE, '_ignore_extra_keys' => TRUE, '_children' => [
                      'plugin' => [ '_type' => 'text',  '_required' => TRUE ],
                    ]
                  ]],
                ]
              ]],

Is this is a documented limitation or a bug?

@OnkelTem
Copy link
Author

@romaricdrigon hello?

@OnkelTem
Copy link
Author

Omg, '_type' => '_choice' should be '_type' => 'choice'

@romaricdrigon
Copy link
Owner

Hello @OnkelTem ,
I was on holidays last week, without my computer nor even mobile network.
I'm glad you found the solution!

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

2 participants