[jQuery] Re: two forms with plugins validator

2008-06-22 Thread Jörn Zaefferer

Please upload a testpage and post the URL here.

Jörn

On Sun, Jun 22, 2008 at 7:19 PM, k8 <[EMAIL PROTECTED]> wrote:
>
> UP UP UP
>
> On 19 Giu, 21:15, k8 <[EMAIL PROTECTED]> wrote:
>> uhm, i have try with submithandler on .validate({})
>>
>> but don't work great the validation
>> this is my code
>>
>> $().ready(function() {
>> $("#FormRegister").validate({
>> submitHandler: function() { alert("Submitted!"); },
>>
>> rules: {
>> username: {
>> required: true,
>> minlength: 3,
>> remote: "/wardb/js/action.php"
>> },
>> password: {
>> required: true,
>> minLength: 5
>> },
>>
>> confirm_password:{
>> required: true,
>> equalTo: "#password",
>> minLength: 5
>> },
>>
>> email: {
>> required: true,
>> email: true,
>> remote: "/wardb/js/action.php"
>> },
>> captcha: {
>> required: true,
>> remote: "/wardb/js/action.php"
>> },
>> agree: "required"
>> },
>> messages: {
>> username: {
>> required: "Please enter a username.",
>> minLength: "Your username must consist of at 
>> least 2 characters.",
>> remote: "Username in use."
>> },
>> password: {
>> required: "Please enter a password.",
>> minLenght: "Your password must consist of at 
>> least 5 characters."
>> },
>> confirm_password: {
>> required: "Please provide a password",
>> minLength: "Your password must be at least 5 
>> characters long",
>> equalTo: "Please enter the same password as 
>> above"
>> },
>> email: {
>> required: "Please insert a email andress.",
>> email: "Please insert a valid email 
>> andress.",
>> remote: "Email in use."
>> },
>> captcha: {
>> required: "Please insert a captcha.",
>> remote: "Please insert a correct captcha."
>> },
>>
>> agree: {
>> required: "Please agree to term of service."
>> }
>> }
>> });
>>
>> });
>>
>> On 19 Giu, 17:37, "Jörn Zaefferer" <[EMAIL PROTECTED]>
>> wrote:
>>
>> > submitHandler is just an option like rules and messages, you can put
>> > them to the others. Looking at what your one does, just remove it - it
>> > submits the form and nothing else, so you don't need it anyway.
>>
>> > Jörn
>>
>> > On Thu, Jun 19, 2008 at 4:06 AM, k8 <[EMAIL PROTECTED]> wrote:
>>
>> > > Hi guys :)
>> > > I have this code:
>> > > [code]
>> > > /* For #joinusFastForm */
>> > > $.validator.setDefaults({
>> > >submitHandler: function() {
>> > >document.getElementById("joinusFastForm").submit();
>> > >//$("#joinusForm").submit();
>>
>> > >}
>> > > });
>> > > $().ready(function() {
>>
>> > >// validate signup form on keyup and submit
>> > >$("#joinusFastForm").validate({
>> > >rules: {
>> > >site: {
>> > >required: true,
>> > >url: true,
>> > >remote: "/youminiweb/js/action.php"
>> > >},
>> > >category: {
>> > >required: true
>> > >},
>> > >email: {
>> > >required: true,
>> > >email: true,
>> > >remote: "/youminiweb/js/action.php"
>> > >},
>> > >captcha: {
>> > >required: true,
>> > >remote: "/youminiweb/js/action.php"
>> > >},
>>
>> > >agree: "required"
>> > >   

[jQuery] Re: two forms with plugins validator

2008-06-22 Thread k8

UP UP UP

On 19 Giu, 21:15, k8 <[EMAIL PROTECTED]> wrote:
> uhm, i have try with submithandler on .validate({})
>
> but don't work great the validation
> this is my code
>
> $().ready(function() {
> $("#FormRegister").validate({
> submitHandler: function() { alert("Submitted!"); },
>
> rules: {
> username: {
> required: true,
> minlength: 3,
> remote: "/wardb/js/action.php"
> },
> password: {
> required: true,
> minLength: 5
> },
>
> confirm_password:{
> required: true,
> equalTo: "#password",
> minLength: 5
> },
>
> email: {
> required: true,
> email: true,
> remote: "/wardb/js/action.php"
> },
> captcha: {
> required: true,
> remote: "/wardb/js/action.php"
> },
> agree: "required"
> },
> messages: {
> username: {
> required: "Please enter a username.",
> minLength: "Your username must consist of at 
> least 2 characters.",
> remote: "Username in use."
> },
> password: {
> required: "Please enter a password.",
> minLenght: "Your password must consist of at 
> least 5 characters."
> },
> confirm_password: {
> required: "Please provide a password",
> minLength: "Your password must be at least 5 
> characters long",
> equalTo: "Please enter the same password as 
> above"
> },
> email: {
> required: "Please insert a email andress.",
> email: "Please insert a valid email andress.",
> remote: "Email in use."
> },
> captcha: {
> required: "Please insert a captcha.",
> remote: "Please insert a correct captcha."
> },
>
> agree: {
> required: "Please agree to term of service."
> }
> }
> });
>
> });
>
> On 19 Giu, 17:37, "Jörn Zaefferer" <[EMAIL PROTECTED]>
> wrote:
>
> > submitHandler is just an option like rules and messages, you can put
> > them to the others. Looking at what your one does, just remove it - it
> > submits the form and nothing else, so you don't need it anyway.
>
> > Jörn
>
> > On Thu, Jun 19, 2008 at 4:06 AM, k8 <[EMAIL PROTECTED]> wrote:
>
> > > Hi guys :)
> > > I have this code:
> > > [code]
> > > /* For #joinusFastForm */
> > > $.validator.setDefaults({
> > >submitHandler: function() {
> > >document.getElementById("joinusFastForm").submit();
> > >//$("#joinusForm").submit();
>
> > >}
> > > });
> > > $().ready(function() {
>
> > >// validate signup form on keyup and submit
> > >$("#joinusFastForm").validate({
> > >rules: {
> > >site: {
> > >required: true,
> > >url: true,
> > >remote: "/youminiweb/js/action.php"
> > >},
> > >category: {
> > >required: true
> > >},
> > >email: {
> > >required: true,
> > >email: true,
> > >remote: "/youminiweb/js/action.php"
> > >},
> > >captcha: {
> > >required: true,
> > >remote: "/youminiweb/js/action.php"
> > >},
>
> > >agree: "required"
> > >},
> > >messages: {
> > >site: {
> > >required: "Please provide a web site.",
> > >url: "Please insert a valid web site.",
> > > 

[jQuery] Re: two forms with plugins validator

2008-06-19 Thread k8

uhm, i have try with submithandler on .validate({})

but don't work great the validation
this is my code

$().ready(function() {
$("#FormRegister").validate({
submitHandler: function() { alert("Submitted!"); },

rules: {
username: {
required: true,
minlength: 3,
remote: "/wardb/js/action.php"
},
password: {
required: true,
minLength: 5
},

confirm_password:{
required: true,
equalTo: "#password",
minLength: 5
},

email: {
required: true,
email: true,
remote: "/wardb/js/action.php"
},
captcha: {
required: true,
remote: "/wardb/js/action.php"
},
agree: "required"
},
messages: {
username: {
required: "Please enter a username.",
minLength: "Your username must consist of at 
least 2 characters.",
remote: "Username in use."
},
password: {
required: "Please enter a password.",
minLenght: "Your password must consist of at 
least 5 characters."
},
confirm_password: {
required: "Please provide a password",
minLength: "Your password must be at least 5 
characters long",
equalTo: "Please enter the same password as 
above"
},
email: {
required: "Please insert a email andress.",
email: "Please insert a valid email andress.",
remote: "Email in use."
},
captcha: {
required: "Please insert a captcha.",
remote: "Please insert a correct captcha."
},

agree: {
required: "Please agree to term of service."
}
}
});

});



On 19 Giu, 17:37, "Jörn Zaefferer" <[EMAIL PROTECTED]>
wrote:
> submitHandler is just an option like rules and messages, you can put
> them to the others. Looking at what your one does, just remove it - it
> submits the form and nothing else, so you don't need it anyway.
>
> Jörn
>
> On Thu, Jun 19, 2008 at 4:06 AM, k8 <[EMAIL PROTECTED]> wrote:
>
> > Hi guys :)
> > I have this code:
> > [code]
> > /* For #joinusFastForm */
> > $.validator.setDefaults({
> >submitHandler: function() {
> >document.getElementById("joinusFastForm").submit();
> >//$("#joinusForm").submit();
>
> >}
> > });
> > $().ready(function() {
>
> >// validate signup form on keyup and submit
> >$("#joinusFastForm").validate({
> >rules: {
> >site: {
> >required: true,
> >url: true,
> >remote: "/youminiweb/js/action.php"
> >},
> >category: {
> >required: true
> >},
> >email: {
> >required: true,
> >email: true,
> >remote: "/youminiweb/js/action.php"
> >},
> >captcha: {
> >required: true,
> >remote: "/youminiweb/js/action.php"
> >},
>
> >agree: "required"
> >},
> >messages: {
> >site: {
> >required: "Please provide a web site.",
> >url: "Please insert a valid web site.",
> >remote: "Your site turns out in ours 
> > database."
> >},
> >category: {
> >required: "Please select a category."
> >},
> >email: {
> > 

[jQuery] Re: two forms with plugins validator

2008-06-19 Thread Jörn Zaefferer

submitHandler is just an option like rules and messages, you can put
them to the others. Looking at what your one does, just remove it - it
submits the form and nothing else, so you don't need it anyway.

Jörn

On Thu, Jun 19, 2008 at 4:06 AM, k8 <[EMAIL PROTECTED]> wrote:
>
> Hi guys :)
> I have this code:
> [code]
> /* For #joinusFastForm */
> $.validator.setDefaults({
>submitHandler: function() {
>document.getElementById("joinusFastForm").submit();
>//$("#joinusForm").submit();
>
>}
> });
> $().ready(function() {
>
>// validate signup form on keyup and submit
>$("#joinusFastForm").validate({
>rules: {
>site: {
>required: true,
>url: true,
>remote: "/youminiweb/js/action.php"
>},
>category: {
>required: true
>},
>email: {
>required: true,
>email: true,
>remote: "/youminiweb/js/action.php"
>},
>captcha: {
>required: true,
>remote: "/youminiweb/js/action.php"
>},
>
>agree: "required"
>},
>messages: {
>site: {
>required: "Please provide a web site.",
>url: "Please insert a valid web site.",
>remote: "Your site turns out in ours database."
>},
>category: {
>required: "Please select a category."
>},
>email: {
>required: "Please insert a email andress.",
>email: "Please insert a valid email andress.",
>remote: "Your address email is in use."
>},
>captcha: {
>required: "Please inser a correct captcha."
>},
>agree: {
>required: "Please agree to term of service."
>}
>},
>});
>
> });
>
>
> $().ready(function() {
>
>// validate signup form on keyup and submit
>$("#joinusCompleteForm").validate({
>rules: {
>username: {
>required: true,
>minlength: 3
>},
>password:{
>required: true,
>minLenght: 5
>},
>email: {
>required: true,
>email: true
>},
>captcha: {
>required: true,
>remote: "/youminiweb/js/action.php"
>},
>
>agree: "required"
>},
>messages: {
>username: {
>required: "Please enter a username.",
>minLength: "Your username must consist of at 
> least 2 characters."
>},
>password: {
>required: "Please enter a password.",
>minLenght: "Your password must consist of at 
> least 5 characters."
>},
>email: {
>required: "Please insert a email andress.",
>email: "Please insert a valid email andress."
>},
>captcha: {
>required: "Please inser a correct captcha."
>},
>agree: {
>required: "Please agree to term of service."
>}
>},
>});
>
> });
> [/code]
> for the submit handler @ joinusCompleteForm ?
> how I can make? :)
>
> Thx @ all .
>