Hi everyone,
in scripts we can challenge an input field over a regex (validation). However this validation only is visual and has no impact on the overall script.
Has anyone find a way to make validation more useful? Here is an example scenario :
* let's consider a payment module called from a script, I have an input field for the amount and a button to transfer the customer to the secure flow. My secure flow processes the amount so I want to make sure that the number format is validated. here is my very simple regex :
^\d+,\d{2}$
.
Now I want to disable the payment button if the format of the amount does not match the regex.
I ve tried adding this in the validation field of the input:
ifElse(^\d+,\d{2}$,{{paymentAmountValidation}}=true,{{paymentAmountValidation}}=false)
but with no luck.
I was also looking at using a dynamic variable but math.js does not handle regex validation
I feel that the validation is currently kind of useless.
Thank you
#Omni-ChannelDesktop/UserInterface#Unsure/Other------------------------------
Jacques Tiberghien
Paxyl Solutions
------------------------------