Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Allow ng-trim to work on password inputs #11632

Closed
miraage opened this issue Apr 17, 2015 · 7 comments
Closed

Allow ng-trim to work on password inputs #11632

miraage opened this issue Apr 17, 2015 · 7 comments

Comments

@miraage
Copy link

miraage commented Apr 17, 2015

Would be great to see password inputs being affected by trim, for example

<!-- no trim -->
<input type="password" ng-model="data.password"> 
<!-- trim -->
<input type="password" ng-model="data-password" ng-trim="true">
@frfancha
Copy link

As passwords can contain white space, this is a very bad idea

@miraage
Copy link
Author

miraage commented Apr 17, 2015

Maybe yes.
I love to use whitespace and special characters in my passwords. 😕

@frfancha
Copy link

Love it or not, this is often enforced by company rules.

@Narretz
Copy link
Contributor

Narretz commented Apr 20, 2015

This was specifically changed to not work with trim here: a7fb357 The commit message is misleading: ngTrim will never trim passwords. I don't see a compelling reason to change this back, but I'll keep it open for further comments.

@Narretz Narretz added this to the Ice Box milestone Apr 20, 2015
@miraage
Copy link
Author

miraage commented Apr 20, 2015

I agree, that in most cases password should be trimmed, but not so rarely we have to allow user to use password that he wants.

@gkalpak
Copy link
Member

gkalpak commented Apr 20, 2015

I don't think that trimming a password is ever a good idea.

@miraage miraage changed the title Allow ng-trim=true to work on password inputs Allow ng-trim to work on password inputs Apr 21, 2015
@lgalfaso
Copy link
Contributor

I have to agree with all the ones that claim that trimming inputs of type password is a bad idea. Closing

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

No branches or pull requests

5 participants