PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

required validation not working #238

Closed vikjung closed 7 years ago

vikjung commented 7 years ago

Description


            <form  name="questadd" method="post" ...

<paper-dropdown-menu id="levelpaper" label="Level" no-label-float required 
error-message="selection is required">

 <paper-listbox  ...```

### Expected outcome
Expected error message.

### Actual outcome

Not showing required error when validating form

### Live Demo

### Steps to reproduce

<!-- Example
1. Put a `paper-foo` element in the page.
2. Open the page in a web browser.
3. Click the `paper-foo` element.
-->

### Browsers Affected
<!-- Check all that apply -->
- [ X] Chrome
- [ ] Firefox
- [ ] Safari 9
- [ ] Safari 8
- [ ] Safari 7
- [ ] Edge
- [ ] IE 11
- [ ] IE 10
tbockrath commented 7 years ago

I had the same issue in chrome. I found out that the required field in the _getValidity- function of paper-dropdown-menu is alway undefined. Setting the required field in the properties solved my problem: properties: { required: { type: Boolean, value: false },...}

vikjung commented 7 years ago

seems has been fixed. thank you for the note tbockrath