Last active
December 12, 2018 15:30
-
-
Save jenshelderweirdt/d333e5377e5ea14d0af44b544bb7cd4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = document.createElement('template'); | |
template.innerHTML = ` | |
<!--Label that will display the input-title 'Email'--> | |
<label for="email-input">Email</label> | |
<!--Input field that will be validated when it loses focus--> | |
<input type="text" id="email-input" name="email-input"> | |
<!--Container for the validation text, hidden by default--> | |
<div> | |
<small style="visibility: hidden;" id="validationtext"></small> | |
</div> | |
<!--Styling for the validation text (class will be added in component logic)--> | |
<style> | |
.invalid { | |
color: red; | |
} | |
.valid { | |
color: green; | |
} | |
</style> | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment