like-gold•16mo ago
valid phone number
Hi, I recently saw an excellent tutorial by @Conner where only valid emails are entered.
Am wondering apart from the VF phone number entity is there another way to ensure valid phone numbers are entered? TIA.
4 Replies
Sure. You can use a regex in a javascript step to validate a phone number.
Something like this:
like-goldOP•16mo ago
Thanks Williams, very helpful, will test it out for my country...🔥
This should work with all contries, just change the regex and the number of numbers.
Is this correct (I just asked ChatGPT)?
Happy to help modify the code.
like-goldOP•16mo ago
yep this is correct,.. i just had a haiku to first extract the number from the user input then saved that extracted and gave to the next haiku to verify using the similar format you have provided. afterwards, added some conditions in the 2nd haiku to output if is valid or not. then the path continues.