ruhley / angular-color-picker

Vanilla AngularJS Color Picker Directive with no requirement on jQuery
http://ruhley.github.io/angular-color-picker/
MIT License
166 stars 79 forks source link

Input field should respect specified format. #145

Closed jooleeunc closed 7 years ago

jooleeunc commented 7 years ago

Even though I specify "hex" as the format, I can specify "green" and it will accept as a valid format. It seems like if I specify "hex", the color picker should validate the format and set form validity to false.

If you think this is a good idea, I can start working on a PR to add this feature.

ruhley commented 7 years ago

I have added a restrictToFormat option to allow for either way

jooleeunc commented 7 years ago

Awesome! Thanks a ton!