Validation¶
The Validation tab helps you identify potential naming issues before they cause problems in your workflow.
Why Validate?¶
Layer names with certain characteristics can cause issues:
- File export failures - Invalid characters prevent saving
- Database errors - Special characters may conflict with SQL
- Cross-platform issues - Some characters aren't allowed on all operating systems
- Sorting problems - Names may not sort as expected
- Display issues - Very long names get truncated
Using the Validation Tool¶
Steps¶
- Go to the Validation tab
- Select layers to validate (or use Select All in the Main tab)
- Click Validate Selected Layers
- Review the results
Understanding Results¶
Results are displayed with status indicators:
| Icon | Meaning |
|---|---|
| Valid - No issues found | |
| Warning - Potential issues detected |
Validation Checks¶
Invalid Characters¶
The following characters are flagged as potentially problematic:
| Character | Name | Why It's Problematic |
|---|---|---|
< | Less than | Not allowed in Windows filenames |
> | Greater than | Not allowed in Windows filenames |
: | Colon | Not allowed in Windows filenames |
" | Double quote | Not allowed in Windows filenames |
/ | Forward slash | Path separator in Unix/Mac |
\ | Backslash | Path separator in Windows |
\| | Pipe | Not allowed in Windows filenames |
? | Question mark | Not allowed in Windows filenames |
* | Asterisk | Wildcard character |
Fix with Remove Special Characters
Enable Remove special characters in the Advanced Options to automatically remove these characters.
Name Length¶
Names longer than 255 characters are flagged.
Why it matters:
- Most file systems limit filenames to 255 characters
- Long names may be truncated when exporting
- Some databases have field length limits
Empty or Whitespace Names¶
Names that are empty or contain only whitespace are flagged.
Examples of problematic names:
- `` (empty)
(only spaces)\t(only tabs)
Leading/Trailing Spaces¶
Names with spaces at the beginning or end are flagged.
| Original | Issue |
|---|---|
Layer | Leading space |
Layer | Trailing space |
Layer | Both |
Why it matters:
- Can cause duplicate name issues
- May not display correctly
- Can cause matching/search problems
Fix with Clean Whitespace
Enable Clean extra whitespace in the Advanced Options to remove leading/trailing spaces.
Common Issues Reference¶
The Validation tab includes a quick reference panel listing common naming issues:
Common Naming Issues to Check:
• Invalid characters: < > : " / \ | ? *
• Names starting/ending with spaces
• Very long names (>255 characters)
• Duplicate names
• Empty names
• Names with only numbers
• Special characters in file paths
Validation Workflow¶
Before Renaming¶
- Open the plugin
- Go to the Validation tab
- Click Validate Selected Layers
- Review any warnings
- Go to Main tab and configure options to fix issues
- Preview changes
- Validate again if needed
- Apply the rename
After Importing Data¶
- Import your data layers
- Open the plugin
- Validate all layers
- Apply the Clean Names quick template if issues are found
- Rename to fix issues
Validation Examples¶
Example 1: File Export Preparation¶
Scenario: Preparing layers for export to Shapefile
Validation finds:
⚠️ Layer<2024>: Invalid character '<', Invalid character '>'
⚠️ Data/Points: Invalid character '/'
✅ Clean_Layer: Valid
Solution:
- Enable Remove special characters
- Preview changes
- Apply rename
- Export files successfully
Example 2: Database Import¶
Scenario: Preparing layers for PostGIS import
Validation finds:
⚠️ My Layer Name: Contains spaces (may need quoting in SQL)
⚠️ layer-with-dashes: Dashes may cause issues
✅ layer_underscore: Valid
Solution:
- Use Find/Replace: Find
(space), Replace_ - Use Find/Replace: Find
-, Replace_ - Apply changes
Example 3: Cleaning Imported Data¶
Scenario: Data imported with messy names
Validation finds:
⚠️ Layer Name : Leading/trailing spaces
⚠️ Layer Name: Multiple consecutive spaces
⚠️ Layer (copy) (1): May indicate duplicate
✅ Clean_Layer: Valid
Solution:
- Enable Clean extra whitespace
- Use Find/Replace to remove "(copy)" text
- Apply changes
Best Practices¶
Regular Validation¶
- Validate before major exports
- Validate after importing external data
- Validate before database uploads
Fixing Issues¶
- Use Remove special characters for invalid chars
- Use Clean whitespace for spacing issues
- Use Find/Replace for specific patterns
Prevention¶
- Establish naming conventions for your team
- Create templates that enforce clean names
- Validate early and often
Validation vs. Preview¶
| Feature | Purpose |
|---|---|
| Validation | Checks current names for issues |
| Preview | Shows what names will become after transformation |
Use both together:
- Validate to identify current issues
- Configure options to fix issues
- Preview to verify the fixes
- Apply the rename