I'm writing a passive validation script that validates fields with the Enter & Exit events and changes the background colour and border colour of just the field's value:
this.ui.oneOfChild.border.fill.color.value = "255,216,229";
this.ui.oneOfChild.border.getElement("edge", 0).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 1).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 2).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 3).color.value = "244,138,159";
This is working fine my question is how can I condense these four lines into one line of code?
this.ui.oneOfChild.border.getElement("edge", 0).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 1).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 2).color.value = "244,138,159";
this.ui.oneOfChild.border.getElement("edge", 3).color.value = "244,138,159";
I'm using this on every single field, and it's starting to make my code swell.
Thanks!