paper-dropdown-menu icon indicating copy to clipboard operation
paper-dropdown-menu copied to clipboard

Validation doesn't work for "required" fields

Open icewhite opened this issue 8 years ago • 0 comments

Description

Documentation refers to the "required" and "error-message" fields, but when they're set the error message is not displayed (It is added to page but the paper-input-error field is set to "visibility: hidden;"

I fixed this by adding mapping of the auto-validate & required fields on the paper-input component of paper-dropdown-menu.html. Snippet below. With this change applied the component works as I'd expect.

        <paper-input
          type="text"
          invalid="[[invalid]]"
          readonly
          disabled="[[disabled]]"
          value="[[selectedItemLabel]]"
          placeholder="[[placeholder]]"
          error-message="[[errorMessage]]"
          auto-validate$="[[autoValidate]]" <!--Added
          required$="[[required]]" <--Added
          always-float-label="[[alwaysFloatLabel]]"
          no-label-float="[[noLabelFloat]]"
          label="[[label]]">

Expected outcome

Error message is displayed when required is set and error-message is defined.

Actual outcome

Error message is not displayed

Live Demo

Steps to reproduce

Browsers Affected

  • [X] Chrome
  • [ ] Firefox
  • [ ] Safari 9
  • [ ] Safari 8
  • [ ] Safari 7
  • [ ] Edge
  • [ ] IE 11
  • [ ] IE 10

icewhite avatar Jan 04 '17 14:01 icewhite