Use this article to set up rules that include or exclude CSV rows before import, review why specific rows are excluded, and understand automatic picklist validation.
Once you've selected your CSV and mapped your fields in the Magical Import module, the Data Validation section lets you filter which CSV rows are imported based on rules you define—either to exclude records that don't meet your quality standards or to target a specific subset of records before importing them into your CRM. This helps ensure only clean, properly formatted data enters your system.
Setting Up Validation Rules
In the Magical Import module's Data Validation section, setting up validation rules lets you define which CSV rows are included or excluded from the import.
- Click the Data Validation heading to expand the section.
- Select a field from the Column Name(s) dropdown.
- Choose Include or Exclude from the Type dropdown: Include imports only rows that match the rule; Exclude skips rows that match the rule during import.
- Set the Condition that values must meet, such as "Contains text" or "Contains digits," and enter any additional text or parameters.
- Click Add Rule to add multiple rules. Records must meet all validation criteria to pass — unlike Matching Criteria, validation rules are not evaluated in order of priority.
- Click Apply to refresh the Preview with your validation rules applied.
The image above shows the Data Validation section of the Magical Import module, labeled with a blue "4" numbered badge. Four validation rules are configured: Email set to Exclude with condition "Value: Contains text" and text "gmail|icloud|outlook|pro..."; a second Email rule set to Exclude with condition "Value: Contains digits"; First Name and Last Name set to Include with condition "Value: Contains only English letters"; and Country/Region set to Include with condition "Length: Minimum" and a minimum value of "3." An "Add Rule" button and a yellow "Apply" button appear below the rules.
For example, if your CSV contains data from multiple countries but you only want to import records for Poland, add a validation rule checking whether the Country field contains "Poland".
The image above shows the Data Validation section of the Magical Import module, labeled with a blue "1" badge. One validation rule is configured: Country/Region is set to Include, with the condition "Value: Contains text" and the text "Poland". An "Add Rule" button and a yellow "Apply" button appear below the rule.
Reviewing Validation Warnings in the Preview
In the Magical Import module's Data Validation section, validation warnings show which CSV rows will be excluded from the import and why.
After you apply your validation rules, the Preview updates to show which records will be excluded. Rows that don't meet your criteria show a warning icon—hover over it to see the specific reason the row will be excluded.
The image above shows the Preview panel in the Magical Import module, with the Filter set to "Show All Rows." The CSV Column header row displays Email, Company Name, and Country/Region. One row displays red warning icons next to the row number, the Email value, and the Country/Region value. A tooltip is expanded over the row, reading "Country/Region: Value length is too short. Email: Value contains digits."
Once you've set your Matching Criteria, a Filter dropdown becomes available in the Preview with several options for reviewing your data:
- Show All Rows: displays every row, regardless of validity.
- Show Only Valid Rows: displays only rows that match records in your CRM and have no warnings — useful for filtering out unmatched or flagged rows so only valid rows are included in the operation.
- Show Only Warning Rows: isolates rows with warnings, letting you review and resolve them without scrolling through the full dataset.
The image above shows the Preview panel in the Magical Import module, with the Filter dropdown open. The dropdown lists five options: Show All Rows, Show Only Valid Rows, Show Only Warning Rows (currently highlighted), Show Only Failed Rows, and Show Only Succeeded Row.
Note: Validation rules apply to the data currently shown in the Preview, not to your original CSV file or CRM database. If you've already modified values using Data Preparation or other bulk updates, validation checks against those updated values — not the original CSV values.
Picklist Validation
In the Magical Import module's Data Validation section, picklist validation automatically checks CSV values against your CRM's picklist options — no rules need to be set up.
When you map a CSV column to a CRM picklist field, Insycle validates the value automatically. If the CSV value isn't one of the valid options, a warning appears, labeled "Invalid picklist value."
To fix an invalid value, edit it directly in the Preview using the same inline editing method covered in Editing CSV Data on the Fly.
The image above shows a portion of the Preview panel in the Magical Import module, with columns for Name, Country/Region, State/Region, City, and Industry. One row displays a red warning icon and a pencil icon next to an Industry value reading "electric," with an expanded tooltip reading "Invalid picklist value."
Next Steps in Configuring Your Import
Once you've set up your validation rules, continue to Bulk Updating or Clearing Fields for All Imported Records to optionally make bulk changes to CRM fields as part of your import.
This article covers one part of the Magical Import configuration. For details on the other settings available in the module, see these related articles:
- Selecting a CSV and Template for Import
- Mapping CSV Columns to CRM Fields, Field Logic, and Matching Criteria
- Date Formats for CSV Imports
- Cleaning and Formatting CSV Data Before Import
- Bulk Updating or Clearing Fields for All Imported Records
- Associating or Linking Records During Import
- Running Your Import
- Comparing CSV Data Alongside CRM Values
- Deleting CRM Records Based on CSV Rows
- Exporting CRM Data Based on CSV Rows
- Understanding Magical Import Results
Additional Resources
Troubleshooting — Review the Magical Import Troubleshooting article if you're not seeing the results you expect when importing records.
Frequently Asked Questions — Check out the Magical Import FAQs for a complete list of questions about importing data into HubSpot using the Magical Import module.
Related Help Articles