Pregunta

I'm building a fairly simple plugin with jQuery that validates a form. When an element is assessed to be valid I run

$(this).prop("valid", false);

In certain instances I'm going to want to block the form from submitting if anything is invalid. Essentially I'm looking for a way to select all the elements where the valid property is false? Am I going to have to iterate over all relevant elements and check for a false reading or is there a jQuery selector that I've overlooked? Something like:

$("input[valid=false]");

Would be nice. Any suggestions?

No hay solución correcta

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top