pryley / float-labels.js

A zero-dependency plugin that applies the float label pattern to a form.
https://pryley.github.io/float-labels.js/
MIT License
88 stars 22 forks source link

Replacing colon with empty string #34

Closed Timu57 closed 5 years ago

Timu57 commented 5 years ago

Is there a reason why the colons in the label text are replaced with an empty string in line 152 by the getLabelText method? I removed the replacing to test if it breaks something but everything worked fine. I need to show a url, with https:// prefixed, to the user.

Thank you in advance

35

pryley commented 5 years ago

It removes an asterisk in case this has been added to the label to denote a required field.

I am unsure why the colon is there, this was added in v1.0.7 however I no longer remember the reason.