Telephone number and address verification
jbarrick
New Altair Community Member
Hi all!
I'm wondering if anyone has used this program to verify telephone numbers or addresses that have been submitted - just to make sure that what we're putting in that we think is a telephone number/ address actually is.
I've been thinking about the process to use, and I've come up with 2 options for the telephone number verification, but I'm not sure how to implement them. First, I thought that I'd be able to keep a database of all known numbers and cross-check any numbers that come into the system to see if they're present in this list. I also thought that I'd be able to run the specific number through a set of rules that all telephone numbers in the United States follow (10 digits, area code can't begin with a 0 or 1, etc.). But I'm not sure how to cross-check a number against a database or send a number through a set of validation rules.
I'd really appreciate any insight to this! Thanks so much!
I'm wondering if anyone has used this program to verify telephone numbers or addresses that have been submitted - just to make sure that what we're putting in that we think is a telephone number/ address actually is.
I've been thinking about the process to use, and I've come up with 2 options for the telephone number verification, but I'm not sure how to implement them. First, I thought that I'd be able to keep a database of all known numbers and cross-check any numbers that come into the system to see if they're present in this list. I also thought that I'd be able to run the specific number through a set of rules that all telephone numbers in the United States follow (10 digits, area code can't begin with a 0 or 1, etc.). But I'm not sure how to cross-check a number against a database or send a number through a set of validation rules.
I'd really appreciate any insight to this! Thanks so much!
Tagged:
0
Answers
-
Hi there,
In RM you can do this by using a filter that applies a parsing rule, in the form of what is called a "regular expression". Regular expressions are strings that act as templates. Libraries of strings for parsing telephone numbers already exist, and tools for making your own are available ( I use RegexBuddy ); doing Regexes without such assistance can be a little brisk ;D Anyways, here's an example to show how easy this is, once you've got your Regex sorted out...<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Have fun!
<process version="5.1.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.1.001" expanded="true" name="Process">
<process expanded="true" height="361" width="807">
<operator activated="true" class="retrieve" compatibility="5.1.001" expanded="true" height="60" name="Retrieve" width="90" x="56" y="116">
<parameter key="repository_entry" value="//Samples/data/Labor-Negotiations"/>
</operator>
<operator activated="true" class="filter_examples" compatibility="5.1.001" expanded="true" height="76" name="Filter Examples" width="90" x="313" y="210">
<parameter key="condition_class" value="attribute_value_filter"/>
<parameter key="parameter_string" value="vacation=.*-.*"/>
</operator>
<connect from_op="Retrieve" from_port="output" to_op="Filter Examples" to_port="example set input"/>
<connect from_op="Filter Examples" from_port="example set output" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
0