compose-form-up
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -244,3 +244,3 @@ // Dependencies | ||
hideMessage( el ) | ||
//hideMessage( el ) | ||
@@ -251,4 +251,10 @@ var label = getClosest( el, 'label' ), | ||
if ( label ) { | ||
label.insertAdjacentHTML( 'beforeend', '<span class="validation-message hidden"><span class="validation-message-text" role="alert">' + message + '</span></span>' ) | ||
label.lastChild.classList.remove('hidden') // Allow for transition | ||
var existingMessage = label.querySelector( '.validation-message-text' ) | ||
if ( !existingMessage ) { | ||
label.insertAdjacentHTML( 'beforeend', '<span class="validation-message"><span class="validation-message-text" role="alert">' + message + '</span></span>' ) | ||
} else if ( existingMessage.textContent != message ) { | ||
existingMessage.innerHTML = message | ||
} | ||
} | ||
@@ -255,0 +261,0 @@ |
{ | ||
"name": "compose-form-up", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"description": "A lightweight HTML5 form validation utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31188
616