Skip to content

Validator attribute required? #47

@michaelwarren1106

Description

@michaelwarren1106

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions