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

Check for "maxlength" attribute instead of "maxLength" in "-guard-for-maxlength.ts" #1202

Closed
shubham88fru opened this issue Mar 15, 2022 · 3 comments

Comments

@shubham88fru
Copy link
Contributor

shubham88fru commented Mar 15, 2022

Hi All,

Shouldn't this piece of code above be doing -

element.getAttribute('maxlength')

(i.e. lowercase 'maxlength').
instead of camelCase 'maxLength' ?

If understand correctly,element represents the DOM element, and if I refer MDN the maximum length attribute is
maxlength and not maxLength

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength

@rwjblue
Copy link
Member

rwjblue commented Mar 15, 2022

We can make that change, but it shouldn't make a difference since el.getAttribute calls .toLowerCase() before actually doing any work (MDN docs here).

@shubham88fru
Copy link
Contributor Author

We can make that change, but it shouldn't make a difference since el.getAttribute calls .toLowerCase() before actually doing any work (MDN docs here).

Ohh I see. Cool. Thanks!

@shubham88fru shubham88fru changed the title Check or "maxlength" attribute instead of "maxLength" in "-guard-for-maxlength.ts" Check for "maxlength" attribute instead of "maxLength" in "-guard-for-maxlength.ts" Mar 15, 2022
@rwjblue
Copy link
Member

rwjblue commented Apr 4, 2022

Going to close this for now, happy for someone to send a PR though.

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

No branches or pull requests

2 participants