I have a form which is validated server-side by ajax call, i want that depending on the ajax call result invalidate or not the inputs in my form, looking at the api i haven’t found any function like “input.setValid(boolean)”, is there any way to do that?
Unfortunately there is no public functionality to do this.
You can use any workaround, like set item label text to red/black by calling:
myForm.setItemText(name, "<span strle='color:red;'>My Input</span>"); // for invalid field
myForm.setItemText(name, "My Input"); // for default/valid field
- span style=…