Hi @lukaspe1 , unfortunately I think this is not possible as you try to do it (did not ever seen that).
But I know you can call the "alert()" method into a JS function with the <soapCall>, it will display a popup just as the alert method in a web browser. (it was available in a 6.0X instance, but should still work today)
It's not very simple, you have to declare a method (into a Schema), implement it in a JS, call it with argument (soapCall > param etc.) to do your check and alert if necessary.
If needed, you can make a general function to display messages to re-use it.
Hope this could help.
(Method implementation : https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/api/web-service-calls.html?lang=en
and https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/schema-reference/elements-attributes/method.html?lang=en (don't forget to declare the @library as mentioned in the doc, the function must be named as xxx_schema_Method() pattern in the js file)
SoapCall into forms : https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/input-forms/form-structure.html?lang=en#soap-methods)
Cedric