From 1a41b32ef7652af9c3670b7207d71e3b21cad2e5 Mon Sep 17 00:00:00 2001 From: RamCohen Date: Tue, 1 Jul 2014 16:16:56 +0300 Subject: [PATCH 1/2] Update core-input.html Knowing when an input is invalid via input-invalid event is not very useful unless an input-valid event is fired when the input is valid again --- core-input.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core-input.html b/core-input.html index d95ddf7..3dd5b13 100644 --- a/core-input.html +++ b/core-input.html @@ -65,6 +65,7 @@ Fired when the inputValue of this text input changes and fails validation. @event input-invalid +@event input-valid @param {Object} detail @param {string} value The text input's inputValue. --> @@ -218,6 +219,8 @@ this.classList.toggle('invalid', this.invalid); if (this.invalid) { this.fire('input-invalid', {value: this.inputValue}); + } else { + this.fire('input-valid', {value: this.inputValue}); } }, From 6fabe0146b08f63bae9b77a045963465579c787a Mon Sep 17 00:00:00 2001 From: Ram Cohen Date: Tue, 1 Jul 2014 22:07:44 +0300 Subject: [PATCH 2/2] Update core-input.html Added documentation for new event input-valid --- core-input.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core-input.html b/core-input.html index 3dd5b13..8dedd44 100644 --- a/core-input.html +++ b/core-input.html @@ -65,6 +65,13 @@ Fired when the inputValue of this text input changes and fails validation. @event input-invalid +@param {Object} detail +@param {string} value The text input's inputValue. +--> + +