Set validation rules for a property
Last updated: August 1, 2023
Available with any of the following subscriptions, except where noted:
|
To help maintain consistent and accurate data in your HubSpot account, you can set rules for custom text and number 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.
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 main 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 custom text or number 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.
- In the right panel, enter the property's basic information, then click Next.
- For the field type, select Single-line text, Multi-line text, Date picker, or Number, then click Next.
- 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 at the bottom of the panel.
Learn more about creating and editing properties in HubSpot.