Hi, I am experiencing an issue using jinja templates and wtforms. I want to add* *form validation capabilities using js with this lib( http://reactiveraven.github.com/jqBootstrapValidation/) as I use bootstrap framework. The problem is that I want to add attribute data-validation-match-match="password" in this line of code {{ form.confirm(class_="input-block-level", placeholder="Confirm password", required="", data-validation-match-match="password") }} Any ideas?
Should the attribute be data-validation-matches-match="password"? On Mon, Jan 14, 2013 at 11:48 AM, Apostolos Kechagias <apkech@gmail.com>wrote: > Hi, > > I am experiencing an issue using jinja templates and wtforms. I want to add > * *form validation capabilities using js with this lib( > http://reactiveraven.github.com/jqBootstrapValidation/) as I use > bootstrap framework. > The problem is that I want to add attribute > > data-validation-match-match="password" > > in this line of code > > {{ form.confirm(class_="input-block-level", placeholder="Confirm > password", required="", data-validation-match-match="password") }} > > Any ideas? > > -- Robert Hanacek Programmer | IdeaLoop, LLC 479.200.3564 | robert@idea-loop.com| www.idea-loop.com
Yes it should. On Mon, Jan 14, 2013 at 8:00 PM, Robert Hanacek <robert@idea-loop.com>wrote: > Should the attribute be data-validation-matches-match="password"? > > > On Mon, Jan 14, 2013 at 11:48 AM, Apostolos Kechagias <apkech@gmail.com>wrote: > >> Hi, >> >> I am experiencing an issue using jinja templates and wtforms. I want to >> add* *form validation capabilities using js with this lib( >> http://reactiveraven.github.com/jqBootstrapValidation/) as I use >> bootstrap framework. >> The problem is that I want to add attribute >> >> data-validation-match-match="password" >> >> in this line of code >> >> {{ form.confirm(class_="input-block-level", placeholder="Confirm >> password", required="", data-validation-match-match="password") }} >> >> Any ideas? >> >> > > > -- > > Robert Hanacek > > Programmer | IdeaLoop, LLC > 479.200.3564 | robert@idea-loop.com| www.idea-loop.com >
If you want to get something that isn't a valid Python identifier into the kwargs of a call, you can use the unpacking operator: {{ form.confirm(..., **{'data-validation-matches-match': 'password'}) }} Jesse On Mon, Jan 14, 2013 at 10:17 AM, Apostolos Kechagias <apkech@gmail.com> wrote: > Yes it should. > > > On Mon, Jan 14, 2013 at 8:00 PM, Robert Hanacek <robert@idea-loop.com> > wrote: >> >> Should the attribute be data-validation-matches-match="password"? >> >> >> On Mon, Jan 14, 2013 at 11:48 AM, Apostolos Kechagias <apkech@gmail.com> >> wrote: >>> >>> Hi, >>> >>> I am experiencing an issue using jinja templates and wtforms. I want to >>> add form validation capabilities using js with this >>> lib(http://reactiveraven.github.com/jqBootstrapValidation/) as I use >>> bootstrap framework. >>> The problem is that I want to add attribute >>> >>> data-validation-match-match="password" >>> >>> in this line of code >>> >>> {{ form.confirm(class_="input-block-level", placeholder="Confirm >>> password", required="", data-validation-match-match="password") }} >>> >>> Any ideas? >>> >> >> >> >> -- >> >> Robert Hanacek >> >> Programmer | IdeaLoop, LLC >> 479.200.3564 | robert@idea-loop.com| www.idea-loop.com > >