Hi Robert,
Attached you have your OML with the input validation implemented as it is recommended by OutSystems. It is a server side validation, but it will work like you describe above.
You can find a tutorial about this in the Form Validations lesson of the Developer Course I. More detailed documentation is also available in Service Studio's online help.
Cheers,
Mário