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

auto-validate issue for paper-input #531

Closed
bhargavkonkathi opened this issue May 4, 2017 · 8 comments
Closed

auto-validate issue for paper-input #531

bhargavkonkathi opened this issue May 4, 2017 · 8 comments

Comments

@bhargavkonkathi
Copy link

bhargavkonkathi commented May 4, 2017

Hello Team,

When I set auto-validate with required property for paper-input element, and given all spaces without any text characters to paper-input element. After navigating to other element it paper-input doesn't show any error, color or error message or invalidate.

Actual:

Not showing any error or error message when we give paper-input filed with all spaces as input value, by setting auto-validate and required filed.

Expected :

Should show error message and invalidate particular input value and show red color with given message, when paper-input is required filed with auto-validate property.

But if we look at in following URL https://material.angularjs.org/latest/demo/input in this section where demo with Errors section box if we go Client Name it is showing error when we given all spaces. It would be nice if we have same feature in polymer as well.

Even in form validate method also ignoring this edge case. But if we check paper-input with
type ="email" it is showing error like expected only,when user gives all empty spaces.

Thanks.

@goatandsheep
Copy link

I'm also finding this issue. When auto-validate="true" and we bind the value of paper-textarea to something (i.e. value="{{inputValue}}"), we get the error: Cannot read property 'textarea' of undefined. We even tried setting the default value of inputValue to empty string or a space, but we still received that error.

@notwaldorf
Copy link
Contributor

Is this in Polymer 1 or Polymer 2? Please provide a JSBin with repro steps, since I can't repro what you mean: http://jsbin.com/xukuxuz/edit?html,output

@goatandsheep
Copy link

goatandsheep commented Sep 28, 2017

Hey thanks for the quick response. This is for Polymer 2. This is the JSbin we made. There are errors in the console. It seems like it's mandatory that the initial value of value is empty.

@notwaldorf
Copy link
Contributor

@goatandsheep oh yeah that totally looks like a bug!

@christophe-g
Copy link

Any news on this issue totally looking like a bug ?

@christophe-g
Copy link

@notwaldorf there is a PR resolving this for paper-textarea Polymer 2.0:
PolymerElements/iron-autogrow-textarea#130

@notwaldorf
Copy link
Contributor

I don’t work on Polymer anymore, ccing @e111077 as an owner

@e111077
Copy link
Contributor

e111077 commented Feb 4, 2019

Hi, that looks like a bug. We are currently going over a large internal migration that may result in a new major release of paper-input. I'll try to see the fix to this makes it in hat change. The owner of this element is also changing soon, so unfortunately it may be a bit until this gets propagated down the line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants