How can I use a TextWatcher to validate an input field in a form?

How can I use a TextWatcher to validate an input field in a form?

  


Hi, Currently, the form validates only when the user presses the submit button, but I want to know how I can do the validations in "real time", i.e when the user is typing the field, 

for example, enter the email. 


Thank you.

Hi German,

To create a mask for your inputs you can use this component: https://www.outsystems.com/forge/647/

To validate in the Server, you can use the OnChange property of the input widget. In there, you can check the value of the email and refresh the form.

Cheers,

José

HI German Quintero,

Jose is correct every input widget you can select the destination as some action in which you can use regex function for complex validation or pattern or you can have your own custom validation and use ajax refresh so that when you type it automatically check the content.

Regards,

Manish Jawla