Text Validate Dynamic Action

Hi.
I have a text box and a button. I have some validations in place on the text box and a button click dynamic event. I am not using a form & submit button because I need to redirect to a custom URL.

In the click event of button, I have 2 actions - validate text box & browser goto (with custom URL).
When the validation fails, browser goto still executes. So I have two questions:

  1. What is the purpose of this validate action… where/how is it used if not this way?
  2. Is there any way to achieve this in Wappler besides custom JS?

When used inside a form, the validation will prevent submitting the form when invalid.
What needs to happen on your page exactly and what are you validating?

But this does not require the dynamic action. Just setting validation rule works.

A regex pattern and text box should not be empty.

On button click, if textbox is validated, user is redirected to the URL set in browser.goto action.

Why not just use dynamic attributes to hide/disable the button if the field is empty or invalid?

Screenshot_14

2 Likes

This works. :slight_smile:

1 Like