Here is some code from a JavaScript object in one of my forms. textEdit should probably be changed to oneOfChild.
function VerifyField(field) {
if (field.rawValue == null) {
scoSpecific.IndicateError(field.ui.textEdit);
} else {
scoSpecific.ClearHighlight(field.ui.textEdit);
}
}
function IndicateError(field){
ChangeBorder(field, "255, 0, 0", ".175mm");
}
function IndicateRequired(field){
ChangeBorder(field, "0, 0, 255", ".175mm");
}
function ClearHighlight(field){
ChangeBorder(field, "0, 0, 0", ".175mm");
}
function ChangeBorder(field, color, thickness){
field.border.getElement("edge", 0).color.value = color;
field.border.getElement("edge", 1).color.value = color;
field.border.getElement("edge", 2).color.value = color;
field.border.getElement("edge", 3).color.value = color;
field.border.getElement("edge", 0).thickness = thickness;
field.border.getElement("edge", 1).thickness = thickness;
field.border.getElement("edge", 2).thickness = thickness;
field.border.getElement("edge", 3).thickness = thickness;
field.border.getElement("corner", 0).color.value = color;
field.border.getElement("corner", 1).color.value = color;
field.border.getElement("corner", 2).color.value = color;
field.border.getElement("corner", 3).color.value = color;
field.border.getElement("corner", 0).thickness = thickness;
field.border.getElement("corner", 1).thickness = thickness;
field.border.getElement("corner", 2).thickness = thickness;
field.border.getElement("corner", 3).thickness = thickness;
}