1
I need to test if a date-* attribute exists in an element and if that attribute is filled with some value:
<input type="text" id="teste" data-validationMessage="Esse campo é obrigatório" /> <!-- Deve retornar true -->
<input type="text" id="teste" data-validationMessage="" /> <!-- Deve retornar false -->
<input type="text" id="teste" /> <!-- Deve retornar false -->
What’s the safest way to do this validation with Javascript?