10-28-2013 09:51 AM
10-28-2013 02:02 PM
<config>
<forms>
<dependencies>
<js src="/js/my-custom-validator.js" />
</dependencies>
</forms>
</config>
<config evaluator="aspect" condition="my:aspect">
<forms>
<form>
<field-visibility>
<show id="my:property" />
</field-visibility>
<appearance>
<field id="my:property">
<constraint-handlers>
<constraint type="MANDATORY" validation-handler="Alfresco.forms.validation.myValidator" event="blur" />
</constraint-handlers>
</field>
</appearance>
</form>
</forms>
</config>
10-29-2013 09:24 AM
10-29-2013 10:45 AM
http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fforms-valhandl...
http://forums.alfresco.com/forum/developer-discussions/alfresco-share-development/share-form-validat...
http://wiki.alfresco.com/wiki/Forms
Alfresco.forms.validation.fileName = function fileName(field, args, event, form, silent, message)
{
var valid = false;
if(YAHOO.lang.trim(field.value).length == 0)
{
valid = false;
}
else
{
if(field.value.indexOf("/") == -1)
{
valid = true;
}
}
if(!valid && YAHOO.lang.trim(field.value).length != 0)
{
Dom.addClass(field.id, "invalid");
if (!silent && form)
{
form.addError("Name cannot contain the slash character \"/\".");
}
}
else
{
Dom.removeClass(field.id, "invalid");
}
return valid;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.