Hello @lsteuerTD
You can copy paste the beanshell code part from here Services Standard Before Provisioning Rule - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community or just add import part
The validator failed for me too and its seems like it was linked to missing import.
Thanks