-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
validation for autocomplete and change to form #532
validation for autocomplete and change to form #532
Conversation
This should be set to go now. |
@ibarrick should we add this to paper-autocomplete's template? |
@miguelcobain I don't think so, that should be taken care of by the paper-input component that the trigger renders if label is defined. We only had to do that in paper-select because it no longer extends paper-input. |
🤔 hmmm Why then does paper-complete need ValidationMixin in the first place? |
I see what you're saying. I can pass |
That makes sense. |
In that scenario it would because the We could remove the validation mixin right now if we wanted but I think that would be a mistake since it is conceivable that a user may want to do more complicated validation on |
I see. So we would be essentially computing the errors on autocomplete and passing them to paper-input for it to render. |
not passing in any validations should ensure that it doesn't compute any of it's own it should just render the messages it's given |
Great. So it seems we have a path forward. |
Added contextual components to paper-form for select and autocomplete. Interesting issue with autocomplete is that there are two properties that we may want to watch for validation over but currently validation-mixin only supports a single validation property. For now I set it to do validation on searchText but that can be changed by the user by passing in validationProperty='selected'.
Validation messages for autocomplete will only show up for the floating label version for obvious reasons.