Hello,
You have to add on before change event for that field then you have to check the number of nodes available in that list. If the count is exceeds your requirement then you to give one alert message and eventObj.ReturnStatus = false;
Depends on your requirement you have to write the code and here is the sample,
function msoxd_my_field2::OnBeforeChange(eventObj)
{
var repeatingNodes = XDocument.DOM.selectNodes("/my:myFields/my:group1/my:group2");
if(repeatingNodes.length > 3)
{
XDocument.UI.Alert("Exceed the nodes");
eventObj.ReturnStatus = false;
}
}
Note: If you want to set the message 'eventObj.ReturnMessage = "your message".