Hello,
I test with a simple form to understand how it works.
Unfortunately unlike the other functions, it seems to me that this is not very well documented. There is a distinct lack of examples in this version 3 of htmlx.
Here to make a simple test I wish I had a message when the login field is empty :
Form validation does not show messages, only red labels (also you can apply your custom style).
To show message you can use your custom validation rule, like this:
function myNotEmpty(val) {
if (val.length == 0) {
alert("Please enter your login.");
return false;
}
return true;
}
function initForm() {
var myForm = new dhtmlXForm("...", [
{type:"input", name: "name", label:"Login", validate: myNotEmpty}
])
}