mercadolibre / chico

A collection of easy-to-use UI components.
http://chico.mercadolibre.com
MIT License
343 stars 87 forks source link

Custom Validation needs to validate again to show changed message #1207

Closed lquintana closed 9 years ago

lquintana commented 10 years ago

If i set a message on error event, the custom needs to validate again to show update the bubble content

lean8086 commented 10 years ago

this.bubble.show isn't updating the content when the Bubble is shown, so use content instead:

ch.Validation.prototype._showErrorMessage = function (message) {
        this.bubble.show(message);
        this.$trigger.attr('aria-label', 'ch-' + this.bubble.name + '-' + this.bubble.uid);

        return this;
};