Below is the function that you provided me on one of my previous posts. I modified it to check for unwanted nesting of columnA/columnB/columnC/columnD/columnE within each other. Bascially our coding pattern prohibits nesting these columns within each other.
Below is the code.
1. The trouble I am having is that it works beautifully for columnA and columnB but not for any other of them

2. I think you are using jQuery below which I am not very well familiar with (so trying to read it up). Also, the function names - are these specific to the tool?
function onStartValidation()
{
#indivcount=0;
$divclassarray='';
}
function onStartTag_div()
{
#indivcount++;
// Message (1, MSG_MESSAGE,'<div> level '+$indivcount+'.'); // for testing
if hasAtt("class")
{
#classindex=getAttIndex("class");
$classvalue=getAttValue(#classindex);
// Throw error if columnA is nested under any other column
if (matchNoCase($classvalue,"columnA") || matchNoCase($classvalue,"columnB") || matchNoCase($classvalue,"columnC") || matchNoCase($classvalue,"columnD") || matchNoCase($classvalue,"columnE"))
{
if isValueInArray("divclassarray","columnA")>=0
{
Message(1,MSG_ERROR,'Cannot nest <div class="'+$classvalue+'"> under <div class="columnA">.');
}
if isValueInArray("divclassarray","columnB")>=0
{
Message(1,MSG_ERROR,'Cannot nest <div class="'+$classvalue+'"> under <div class="columnB">.');
}
if isValueInArray("divclassarray","columnC")>=0
{
Message(1,MSG_ERROR,'Cannot nest <div class="'+$classvalue+'"> under <div class="columnC">.');
}
if isValueInArray("divclassarray","columnD")>=0
{
Message(1,MSG_ERROR,'Cannot nest <div class="'+$classvalue+'"> under <div class="columnD">.');
}
if isValueInArray("divclassarray","columnE")>=0
{
Message(1,MSG_ERROR,'Cannot nest <div class="'+$classvalue+'"> under <div class="columnE">.');
}
}
$divclassarray[#indivcount]=$classvalue;
}
}
function onEndTag_div()
{
$divclassarray[#indivcount]='';
#indivcount--;
}
Thanks in Advance!
-Anjana P