Hi Jörn,
Thanks for reply,

now here the context why I need to use "*id*" instead of "*name*"
I have a form somethink like this:

<form>
<div class="box-col-l">
   <div class="det-prpty"><label for="FirstName">First Name:*</label></div>
   <div class="det-value"><input id="txtPersonFirstName"
name="Order.CustomerPerson.FirstName" type="text" value="" /></div>
   <div class="det-prpty"><label for="LastName">Last Name:*</label></div>
   <div class="det-value"><input id="txtPersonLastName"
name="Order.CustomerPerson.LastName" type="text" value="" /></div>
   <div class="det-prpty"><label for="Email">Email:*</label></div>
   <div class="det-value"><input id="txtPersonEmail"
name="Order.CustomerPerson.Email" type="text" value="" /></div>
   <div class="det-prpty"><label for="Telephone">Telephone:*</label></div>
   <div class="det-value"><input id="txtAddressPhoneNumber"
name="Order.Address.PhoneNumber" type="text" value="" /></div>
   <div class="det-prpty"><label for="Company">Company:</label></div>
   <div class="det-value"><input id="txtPersonCompany"
name="Order.CustomerPerson.Company" type="text" value="" /></div>
</div>
</form>

so, as you can see the name attribute is already used for server side
processing,  it's .net syntax doesn't work within validate plugin for
construction {rules:{
                            fieldName:"value"
                            }
}

Certainly, I can add rules for each form input separately using
$("#inputId").rules(), but it looks a bit ugly if we have many fields are
been validated

Stani


2009/7/30 Jörn Zaefferer <joern.zaeffe...@googlemail.com>

>
> The plugin supports only names, you'd have to hack the plugin to change
> that.
>
> If you provide some context on why you think you need that, it would
> be easier to propose a solution.
>
> Jörn
>
> On Wed, Jul 29, 2009 at 8:15 AM, zaka29<zak...@gmail.com> wrote:
> >
> > Hi,
> >
> > Please give advise, how to assign rules for form elements using their
> > ids attributes instead of "name" e.g
> >
> > rules:{
> >          name: "required", //plugin retrieves form element by name,
> > but should be "id"
> >          email: "required"
> >        }
> >
> > Thanks
> >
>

Reply via email to