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

Validator attribute required? #47

Open
michaelwarren1106 opened this issue Apr 19, 2023 · 1 comment
Open

Validator attribute required? #47

michaelwarren1106 opened this issue Apr 19, 2023 · 1 comment

Comments

@michaelwarren1106
Copy link
Collaborator

One of my devs got an error today about an attribute property not existing on a validator object.

The error came from this line:
https://github.com/open-wc/form-participation/blob/main/packages/form-control/src/FormControlMixin.ts#L39

Which seems to be coded as if the attribute key in the validator object is required, but its typed as optional in the TS typing. IMO it should be optional, so should we do an existence check on the .attribute prop in that map function?

@calebdwilliams
Copy link
Collaborator

We should.

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