Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug-In Thought: Country & Region Field Lists and Validations #252

Open
colinfrederickson opened this issue Oct 4, 2023 · 0 comments
Open
Assignees

Comments

@colinfrederickson
Copy link
Contributor

Description:

A Flatfile plugin to provide predefined country and region lists, and validations for ensuring the integrity of region-to-country relationships in uploaded datasets.

Core Features:

Predefined Country and Region Lists: A maintained list of countries and their corresponding regions (e.g., states in the US, provinces in Canada).

Field Validations: Validates that the chosen region belongs to the selected country.

Custom Error Messages: Provides clear error feedback to users if they upload mismatched country-region pairs.

Use Cases:

Data Integrity: Ensure that uploaded datasets have valid country-region pairs.

Error Prevention: By validating data on-the-fly, reduce the chances of bad data entering the system.

Integration Points:

Fields: When defining fields in Flatfile, administrators can choose "Country" or "Region" types, which will utilize the plugin's predefined lists.

Hooks: The plugin will hook into Flatfile's validation processes, checking records for country-region consistency and flagging errors.

Potential Challenges:

Data Maintenance: As geopolitical changes can occur (e.g., new countries or changes in regions), there's a need for periodic updates to the country and region lists.
Performance: For very large datasets, real-time validation might introduce some latency.

Future Enhancements:

Country-Specific Validations: Extend the plugin to support other country-specific validations, like postal code formats.
Dynamic Dropdowns: Depending on the selected country, the region dropdown dynamically adjusts its options. (feature request tracked here: https://flatfile.productsignals.com/search/undefined

Repo with Existing Framework:

https://github.com/colinfrederickson/Boast-Testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants