Regex check handling

(linux laverka) #1

Hi, first of all i would like to say thank you to your team, flow xo is such easy and great project and tool!!

my question is the next:
if i have regex or email validation, how i can address to result of this check. Do i have an option like {{is email correct.choice}} where i can compare if it equals to 0 or 1. At present moment i can only recheck it few times if it doesn’t meet requirements, but i want to handle manually and can’t check it correctness. Please help me ))

(Nathan Stults) #2

Linux, I apologize but I’m not following your question, I’m not what you are asking. Perhaps you could explain with an example.

(linux laverka) #3

for example:
step 1: ask phone number
step 2: apply to this answer custom regex check (advanced validation) if correct format
step 3: i want to see step 2 result, for example step 2 had valid phone, or not

like in other sections i can address to answers, for example i had code snippet and after processing this step i could address to result like {{execute_code.result}}
do we have such option for regex check? i dont want it to ask question again if incorrect question, i want to have this answer for controlling my flow

(Nathan Stults) #4

I think I understand.

You cannot use the Ask a Question validation in this way. However, you can ask a question with NO validation, then apply Regex to the answer in the following steps to accomplish your goal. You can use a Code block for this, as all normal JavaScript Regex functions are available there.

Nathan