I need to validate the fields of a form with jquery and I already had some but this form is written in php and it does not come out, This is the code of the form
<form name='frmUpdEspecialidades' id='frmUpdEspecialidades' action='qryEspecialidades.php' method='POST'>
<table align='center' width='430'>
<tr height='100'>
<td colspan='2' align='center'>
<b>Modificando especialidades</b>
<input type='hidden' id='hdnOpc' name='hdnOpc'>
<input type='hidden' id='hdnId' name='hdnId'>
</td>
</tr>
<tr>
<td>Id</td>
<td>$id</td>
</tr>
<tr>
<td>Clave</td>
<td><input type='text' id='txtClave' name='txtClave' value='$clave'>
</td>
</tr>
<tr>
<td>Nombre</td>
<td><input type='text' id='txtNombre' name='txtNombre' value='$nombre'>
</td>
</tr>
<tr>
<td colspan='2' align='center'>
<input type='button' id='btnGrabar' name='btnGrabar' value='Grabar' style='width:100px' onClick='enviar(\"modificar\")'>
</td>
</tr>
and this is the jquery code I'm using
function validarFormulario(){
$("#frmUpdEspecialidades").validate();
}
I already send the url of jquery and even then it does not work I keep recording the data even if there are empty fields