How to validate the properties of objects?

Hello,
I want to add validations to the object properties like regex, email and phone number, etc, Is there any validation API? How can I validate the fields according to my use cases through API?

Thanks
Srushti Shah

Hi, @srushti18shah :waving_hand: Thanks for the great question. There is not a Validation API. Your options will include:

  • using the validations that are used with the Properties API
  • using the Data Quality Command Center features available with Operations Hub
  • handling your validation externally before sending your data to HubSpot

Best,

Jaycee

Hi @srushti18shah,

Yes! We installed Real Contact Phone Grading HubSpot app by Trestle. The app can do a phone validation check, grade contact details, and email deliverability check all in one query! The Phone Activity Score is an esspecially helpful data point to determine connected/disconnected phone line status.

To connect the HubSpot app with Trestle, you will need a Trestle API key which you can get for free here (link to sign up). Otherwise, it is fairly easy to install!

New contacts added to HubSpot will automatically be graded/verified with this app. Trestle also has batch processing options from their portal.
Hope this helps!

Hey @srushti18shah,

Great question! To validate fields like email addresses and phone numbers via APIs, you can use a combination of Numverify and Zapier for easy integration. Here’s how:

1. Email Validation

To validate email addresses, Numverify has a simple Email Validation API. It checks if the email is valid and active, as well as whether it’s disposable or not.

  • When a user enters their email, send it to Numverify via the API.
  • You’ll get a response on whether the email is valid or invalid.

Check it out here: Numverify Email Validation

2. Phone Number Validation

For phone numbers, Numverify can validate whether the number is correct, active, and formatted properly. It also checks the country code and carrier.

  • Send the phone number to Numverify.
  • It will return data confirming if it’s a valid number.

Start using the Numverify Phone Validation API here: Numverify Phone Validation API

3. Automate Validation with Zapier

If you want to automate the validation process, Zapier makes it easy. You can connect Numverify with your forms or CRM, so whenever a phone number or email is entered, it gets automatically validated.

  • Use Zapier to send the data to Numverify when it’s submitted.
  • Zapier updates your CRM or database with the validation results.

Learn more about Numverify + Zapier Integration here: Numverify + Zapier

4. Custom Validation with Regex

If you need more control over custom fields, like validating a specific address format, you can use regex (regular expressions). It lets you define patterns for validation (e.g., validating a postal code).

Let me know if you need any help setting this up!

Cheers,

Aanchal