Added support to set up a validate options for validate() in "form" type #19

Merged
merged 1 commit into from Aug 23, 2011

Conversation

Projects
None yet
2 participants
Contributor

Perlover commented Aug 21, 2011

Sometimes i need to setup validate options for validate() method (in dform: '[pre]' subscription for 'form')

Example: current version doesn't allow to me set up validate options for radiobuttons. I cannot use validate subscription for "radiobutton" (because it's "div" and there is exception of validate plugin)

I don't know other way only to do it through:
form.validate({rules: {radio_group: "required"}})
But current version of dform doesn't have a way to setup this options

Here a patch
Now we can to do it like:
{
action: "/url/here/",
method: "post",
validate: {rules: {radio_group_name: "required"}},
elements:
[
....
]
}

My examples are works for this.

@daffl daffl pushed a commit that referenced this pull request Aug 23, 2011

David Luecke Merge pull request #19 from Perlover/feature/validate-opts
Added support to set up a validate options for validate() in "form" type
43b9c40

@daffl daffl merged commit 43b9c40 into daffl:master Aug 23, 2011

Contributor

Perlover commented Aug 24, 2011

Thanks! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment