Dear Expert,
Can you please help me with validation of a phone number and email column.
Phone number column need to be validated with 10 digit and email column to be validated cell value should have @ and .(dot) in entry
Solved! Go to Solution.
Hey @Avishek1
Here are two formulas to create new fields that should help you out...
To check the phone number field:
iif(IsNumber([Phone]) && Length(tostring([Phone]))=10, "Valid", "Invalid")
This first ensures the value is a number then it also checks that the length of the value is 10, if so, the new field will say valid. Otherwise it will say invalid.
To check the email field:
iif(Contains([Email], "@") && Contains([Email], "."), "Valid", "Invalid")
This checks to see if the email field contains both an @ and a period. If so, the new field will say valid. Otherwise it will say invalid.
Hope this helps!
Hi again,
I suggest using a Formula tool with some slight improvements to @Kenda`s Email validation formula.
You can find below a solution for this.
Bogdan,
Quick question - how is your phone number field formatted? is it something like
(xxx)xxx-xxxx
xxxxxxxxxx
+1xxxxxxxxxx
xxx.xxx.xxxx
Or some combination? Does it have extensions?
If it's not xxxxxxxxxx - ie exactly 10 numbers you'll have to make some adjustments
Let`s help the fellow. Did some changes to the short workflow to reflect the possibilities highlighted by @apathetichell as well.
@BogdanCalacean this workflow is only working when the Phone is of Integer data type , however for me the data type is v_string and it is not working there
It would really help if you post some samples of your phone number data so we can try to understand what your data looks like. As I've noted - phone numbers can be set up multiple ways.
If it's just an issue with string vs number you can modify @BogdanCalacean and @Kenda's work. For @BogdanCalacean's just change the first part of the formula tool to:
iif(IsNumber(tonumber([Phone])) && Length([Phone])=10, "Valid", "Invalid")
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |