I have a form:
<form id="userForm" action="xpto">
<input type="text" name="form[data_nascimento_beneficiario_1]" value />
<input type="submit" value="Continuar" />
</form>
Now on a script file i try to get the lenght of the field for validation:
$("#userForm").submit(function (e) {
alert($("input[name="form[data_nascimento_beneficiario_1]"]).length());
});
But i always get "TypeError: Cannot call method 'length' of null",
I guess the problem is on the name to have "form[]", but that is nothing i can change :(
Can anyone help me please?
Regards to all.