planning-center-monorepo v1.0.0
planning-center-monorepo / planning-center-people-ts/src / validateContactSimilarity
Function: validateContactSimilarity()
validateContactSimilarity(
searchEmail,searchPhone,personEmails,personPhones):object
Defined in: packages/planning-center-people-ts/src/helpers.ts:318
Validate contact info similarity for name-based matches
This is useful when falling back to name-based search to ensure we don’t match the wrong person with the same name.
Parameters
searchEmail
string
Email being searched for
searchPhone
string
Phone being searched for
personEmails
string[]
Array of email addresses from the person’s profile
personPhones
string[]
Array of phone numbers from the person’s profile
Returns
object
Object with match results and overall validity
emailMatch
emailMatch:
boolean
phoneMatch
phoneMatch:
boolean
isValid
isValid:
boolean