Forum

AlexanderKrieger
Participant
    Has successfully completed the online course Intermediate (200)
    Has successfully completed the online course Advanced (300)
    Has successfully completed the online course Basics (100)
    Has successfully completed the online course Advanced (310)
    Has successfully completed the online course Advanced (320)
2 years, 9 months ago #35432
Up
0
Down
::

For regex, you need to Subscribe to the button event. Then execute a custom script, getting the contents of the textfield.

Either by
var element = sap.ui.getCore("Application").byId("MY UIELEMENT ID").getValue();

or by getting the binded variableHolder via:

var element = this.getGlobals().getVar("MY VARIABLEHOLDER").getValue();

then inserting the data into a regex Javascript. Examples:
https://www.w3schools.com/jsref/jsref_obj_regexp.asp

Further you have 2 ways of designing the display of an error message:
Either Toast-Message and Red Border on Elements

or:
Assigning a new Variable with an error or success-message and putting that variable in an UI-Event.