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

Input validation #10

Closed
finnurbreki opened this issue Jan 22, 2019 · 1 comment
Closed

Input validation #10

finnurbreki opened this issue Jan 22, 2019 · 1 comment

Comments

@finnurbreki
Copy link

finnurbreki commented Jan 22, 2019

What is the expected outcome of calling:

select({});
select({multiple: true});
select({properties: ['name']});
select({multiple: true, properties: []});
select({multiple: true, properties: ['foo']});

@beverloo
Copy link
Member

beverloo commented Jan 23, 2019

Thanks! I added a clarification.

select({});

TypeError as at least one property must be provided.

select({multiple: true});

TypeError as at least one property must be provided.

select({properties: ['name']});

A picker will be shown. (multiple has a default value.)

select({multiple: true, properties: []});

TypeError as at least one property must be provided.

select({multiple: true, properties: ['foo']});

TypeError as foo is not included in the ContactProperty enumeration.

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