Skip to content

Instantly share code, notes, and snippets.

@fininhors
Created December 4, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fininhors/da6c39e5cad8f054d700c0e5868188c4 to your computer and use it in GitHub Desktop.
Save fininhors/da6c39e5cad8f054d700c0e5868188c4 to your computer and use it in GitHub Desktop.
function validaCamposForm() {
/* Versão ES6 */
var elements2 = document.querySelectorAll('.obrigatorio');
var mapeados = Array.prototype.map.call(elements2,
element => ({ type: element.tagName, value: element.value, title: element.title })
);
var filtrados = mapeados.filter(mapeado => mapeado.type == "INPUT")[0];
let retorno = [];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment