validation with custom rule not work

Hi,

I have a form with a custom rule in a input:





This is the event of the button:

form.attachEvent(“onButtonClick”, function(b){
switch(b){
case “submit”:
form.validate();
break;
}
}

And the javascript function is:

function validTwo(value) {
alert("¿valid?");
return true;
}

The function “notEmpty” works, but the other not. Never get the message “¿valid?”!
Help me!

hi

please provide completed demo including all corresponfing js/css files

is solved. I did not include the function where it should :slight_smile:

Thanks