Form Validation - What am I doing Wrong?

I have attached a html form to a tab and am trying to validate a fields before saving.

I have added validate=“rule”
I have added onclick=“return form.validate()”
Tried attaching events to the form then I tried attaching event to the dp, but nothing works, marks all fields as invalid and stop the form submit or it ignores the validation rule completely

And then there this sample code http://www.dhtmlx.com/docs/products/dhtmlxForm/samples/05_data/04_save_validation.html#code doesnt appear to work!

  1. Open your dhtmlxForm package
  2. Open samples/05_data/04_save_validation.html and try to launch it from any kind of server. Will it work for you?

Olga, no, the code is identical to the sample online and does not validate.

I have a tabbar, with a layout attached, to one cell of the layout I have attached a HTML FORM using attach object. The form has a dp for updating the record loaded.

I have added validate=“rule”
I have added onsubmit=“return form.validate()”

When I attempt to implement nothing happens it submits the form.

Is there a working example of a HTML Form with dp and validation?

I am desperate here!