added required icon for feedback icons

Added the option to have a require icon display prior to user interaction to show what fields are required.
This is useful for people that only use Labels for screen readers only, therefore taking advantage of the placeholder attr. for design purposes.

These changes can be viewed and tested in the demo/feedbackicons.html

Please review my code let let me know if there is anything I need to change. 
This looks to see if you set the required icon option. if you haven't, it
won't apply and show the feedback icon.
Based on the code, this will only apply to fields that are required or have
the bv data validation attr.


On Wed, Jul 2, 2014 at 11:02 AM, Phuoc Nguyen <notifications@github.com>
wrote:

> In dist/js/bootstrapValidator.js:
>
> >                                      .addClass('form-control-feedback')
> >                                      .attr('data-bv-icon-for', field)
> >                                      // Place it after the label containing the checkbox/radio
> >                                      // so when clicking the icon, it doesn't effect to the checkbox/radio element
> >                                      .insertAfter(('checkbox' === type || 'radio' === type) ? $field.parent() : $field);
> > +
> > +                    // Show required icon if option is set
> > +                    if (this.options.feedbackIcons.required !== null && this.options.feedbackIcons.required !== undefined) {
> > +                        $icon.addClass(this.options.feedbackIcons.required).show();
> > +                    }
>
> Does this line mean that the required icon will be added to *every*
> fields?
> I thought this icon is only for *required* fields? (which have required
> attribute or use notEmpty validator)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/nghuuphuoc/bootstrapvalidator/pull/453/files#r14461685>
> .
>



-- 
Michael Guild
571.338.9782
michaelguild13@gmail.com