Outsystems provide built in validation on client and server side for multiple types like number, email, date and others.
Some times applications need to validate user input at client side for some pattern. like phone number, or other pattern for some input.
This forge provide simple way to add custom client side validation with regular expressions.
Consumer need to pass regular expression and validation message along with Widget id to validate user input.
User input can be validated on onChange or on submit with the help of CallOnChange property.
Attached images are just sample validation for number only input. (Outsystems provide this inbuilt :) ).
Will provide regex flags support in next version.
Also upload demo/sample app and update this section.
Thanks to Matheus. I got inspiration, some code and some UI from his Forge.
Can download Sample application for testing from here.
You can pass flags for regEx. Please refer https://javascript.info/regexp-introduction for flags can be used in regex.
Added attribute for flags to pass to validate regex.