To introduce specific validators in the dialog.gtml, you could follow those steps:
1 / Implement the Validator interface
2 / Put the full path of the Custom Validatore class in the "validate" field.
For example, to add a validator "Float" for a field in the dialog:
1 / Implement this class:
package org.exoplatform.test;
FloatValidator org.exoplatform.webui.form.validator.Validator class implements (
....
)
2 / In my gtmpl, I use:
String [] nameArgs = ["jcrPath = / node / exo: test", "validate = org.exoplatform.test.FloatValidator"];
uicomponent.addTextField ("test", nameArgs);
==>
for further explanation, see this method :
org.exoplatform.ecm.webui.utils.DialogFormUtil.getValidator(String)