Good day!
I'm using the Password Validator Reactive component from Forge in my app. When I type in the input, it validates automatically (on change).
However, I want the password to be validated only when I click a button, not while typing.
The problem is:
The Password Validator has an event handler.
My custom button does not have an event that triggers the validator.
Is there a simple way to make the button trigger the password validation manually?
Thank you!
Hello jesu,
Hope you're doing well.
After installing this Forge component, I verified that there is no Web Block called WB_PasswordValidator.
I think you pretended to mention this one instead: Password Validator Reactive. The name is quite similar, but it is not the same.
Anyway after exploring the component, the main reason why it is validating automatically, is because of this EventListener in the OnReady event of the Block:
This keyup event is fired when a key is released.
In order to do what you pretend, basically you'll need to pass the logic from the Block to the Screen. Therefore you will not need the WB_PasswordValidator Block at all.
You just need to adapt your CheckItOnClick client action in order to include the necessary logic:
You'll also need to include the Password_BuildRegexPattern client action in your module.
Last but not least, you need to adapt your IsValid if statement with the correct condition:
Please refer to the attached OML file that contemplates these changes.
Hope that this helps you!
Kind regards,
Rui Barradas
Thank you so much for replying and sir sorry for my confusion and might check this, thank you sir
and may i ask sir if the value is fixed? that i will include already the details in the left? i will input the true false and min and max inside the backend