Add the code below to Custom CSS field on your Form widget’s Appearance tab:
[class^="FormLayout__Error"],[class^="FormFieldLayout__Error"] {
color: rgb(143,0,255);
}
[class^='FormFieldLayout__Container-sc-']:has([class^='FormFieldLayout__Error-sc-']) [class^='TextControlBase__TextControlBaseContainer'] {
border-color: rgb(143,0,255)!important;
}