Config validation
custom_types.json are a JSON-only feature and cannot be configured via the SquaredUp application. They must be created and edited directly in a plugin folder.
Config validation allows a plugin to verify that a user's configuration is valid before a data source is created.
How config validation works
When a user adds your plugin as a data source, SquaredUp runs the configured validation steps and displays the result of each step in the setup UI.
Each validation step executes a data stream and evaluates whether the request succeeds. Typically, you'll choose a lightweight data stream that requires the same authentication and permissions as the rest of the plugin.
If the request succeeds, the step passes. If the request fails, the configured error message is shown to the user.
Validation steps run in sequence and can either be informational or required. If a required step fails, the user cannot complete the data source setup until the issue is resolved.
Config validation helps users identify configuration issues early, such as invalid credentials, missing permissions, or inaccessible resources, rather than encountering them when they first use the plugin.
Adding config validation
Create a configValidation.json file at the root of your plugin folder, alongside metadata.json.
Example
{
"steps": [
{
"displayName": "API access",
"dataStream": {
"name": "monitors"
},
"success": "Successfully connected to API",
"error": "Cannot access the API — check your API key and permissions",
"required": true
}
]
}Top-level properties
Step properties
Multiple validation steps
Plugins can define multiple validation steps to test different aspects of a configuration independently.
For example, one step might verify that authentication is working, while another confirms that the user has access to a required resource or API endpoint.
Using separate validation steps can make troubleshooting easier by showing users exactly which part of the configuration has failed.
Example
{
"steps": [
{
"displayName": "API access",
"dataStream": {
"name": "apiStatus"
},
"success": "Successfully connected to the API",
"error": "Unable to connect to the API",
"required": true
},
{
"displayName": "Project access",
"dataStream": {
"name": "projects"
},
"success": "Project access verified",
"error": "Unable to access projects with the current credentials",
"required": true
}
]
}Tips
- Use a lightweight data stream for validation to minimize setup time.
- Avoid validation streams that return large datasets or perform expensive operations.
- Write actionable error messages that tell users what to check or change, not just that something failed. For example:
"Check your API key has theread:monitorsscope"
Rather than:
"Invalid credentials" - Use multiple validation steps when different permissions or resources need to be verified independently.
Examples
- UptimeRobot configValidation.json:
Validates API access using the configured API key before allowing the data source to be created. - FantasyPremierLeague configValidation.json:
Validates that the plugin can successfully retrieve data from the Fantasy Premier League API before setup is completed.