jquery validation on fosuserbundle form -


i validate form made fosuserbundle jquery validation plugin.

i can't change property name of input, in code can't use square brackets assign property.

here code:

html made fosuserbundle:

<input type="text" id="profile_factord" name="profile[factord]" class="form-control" placeholder="d" value="20"> 

jquery code validate input:

$("#profile_form").validate({     errorplacement: function (error, element)     {         element.before(error);     },     rules: {         profile[factord]: {             required: false,             digits: true,             maxlength: 3         }     } }); 

error display:

uncaught syntaxerror: unexpected token [ 

any ideas? sorry bad english


Comments