formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.22k stars 405 forks source link

Parsers is not working #716

Open vanthanh opened 7 years ago

vanthanh commented 7 years ago

My example: https://plnkr.co/edit/1QTzw4EAVck1G7fK9rPL?p=preview

Jefiozie commented 7 years ago

Please follow the instructions of the issue template. this will help people in contributing and reproducing the issue.

vipin1770 commented 7 years ago

i have correct your code please follow the link: https://plnkr.co/edit/Tav7PVk6RVD4PtdanQWz?p=preview

kwypchlo commented 7 years ago

I believe your plunker works properly. Parser will store the value as uppercase in the model. If you add another field to your html ex. <input ng-model="model.lastName"> and try to write something there, you will see that your field in formly will receive uppercase value due to a formatter. You probably expect the text to be uppercased in the formly field "live" when you write something but this is not the case here, parsers work on model when user enters some value through the input and formatters work when the model value changes. To achieve visually uppercase letters in the input use css text transform.