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

AMP validation: The attribute '[type]' may not appear in tag 'INPUT [type=password]'. #23082

Closed
Stefany93 opened this issue Jun 27, 2019 · 4 comments · Fixed by #23826
Closed

Comments

@Stefany93
Copy link

What's the issue?

AMP validation error The attribute '[type]' may not appear in tag 'INPUT [type=password]'.

How do we reproduce the issue?

I am creating a show / hide password button and if I set the input type to password, AND add the [type] amp-bind attribute, the AMP validator starts screaming with the above-mentioned error. If I set the input type to text, it works fine.

Code:

<form class="m3" action-xhr="https://example.com" method="post" >
        Password: <input type="password" [type]="toggleType ? 'password' : 'text'" value="password" >
</form>

Which AMP version is affected?

Version 1906191709480

@dreamofabear
Copy link

If the format of the AMP document is AMP4EMAIL, this is working as intended. We currently disallow input[type=password] as well as changing input[type] at runtime to prevent potential spam/cloaking.

@Stefany93 Can you share the full page HTML?

@Stefany93
Copy link
Author

Stefany93 commented Jul 1, 2019

Sure! https://codepen.io/Stefany93/pen/KjyryP?editors=1000 I made a button to hide / show password field.
I hope you won't disallow it, heh. The type is initially text which is actually better user experience than being initially password but I was wondering if it is a bug. It is working fine. Just not password to text

@dreamofabear
Copy link

Ok, this is just an inconsistency for the AMP format. Thanks for the report.

@Stefany93
Copy link
Author

@choumx thank you

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

Successfully merging a pull request may close this issue.

2 participants