Set validation rules for a property
Last updated: September 4, 2024
Available with any of the following subscriptions, except where noted:
All products and plans |
To help maintain consistent and accurate data in your HubSpot account, you can set rules for custom text and number properties, as well as certain default properties. When validation rules are set for a property, users must meet the property's requirements in order to save a value.
For example, you could create an Order Number text property where values can only contain numeric characters, or create a Payment amount number property where values can only contain up to two decimal places.
Please note: validation rules are not currently enforced when setting property values via form submissions or workflows.
In addition to custom text and number properties, you can set validation rules for the following default HubSpot properties:
- Company properties: Street Address, Street Address 2, Annual Revenue, City, Country/Region, Country/Region Code, Employee range, Company name, Number of Employees, State/Region, Postal Code.
- Contact properties Street Address, Annual Revenue, City, Company Name, Country/Region, Email, First Name, Industry, Job Title, Last Name, Message, Salutation, State/Region, Postal Code.
- Deal properties: Amount, Closed Lost Reason, Closed Won Reason, Deal Name, Next step.
- Ticket properties: Ticket name.
Users must have Edit property settings permissions to set validation rules for a property.
- In your HubSpot account, click the settings settings icon in the top navigation bar.
-
In the left sidebar menu, navigate to Properties.
-
Click the Select an object dropdown menu, then select [Object] properties to create or edit a property for that object.
- To add validation rules to an existing property, click the property's name, then click the Rules tab in the right panel.
- To create a new property with validation rules, in the upper right, click Create property.
- Enter the property's details, then click the Field type tab.
- For the field type, select Single-line text, Multi-line text, Date picker, or Number, then click the Rules tab.
- Select checkboxes to turn on validation rules for property values. The options available depend on the property's field type:
- Single-line text or Multi-line text: set a minimum character limit, set a maximum character limit, restrict values to only numeric characters, or disallow special characters ($, %, etc.).
- Date picker: set the dates allowed for this property based on your account’s timezone.
-
- Number: set a number range or set a number of decimal places.
- Once you're done, click Create or Save.
Learn more about creating and editing properties.