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

fix(validation): use dynamic schema validator for common fields #494

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

Birkbjo
Copy link
Member

@Birkbjo Birkbjo commented Jan 16, 2025

Fixes the comment in regards to shortName validation: https://dhis2.atlassian.net/browse/DHIS2-18538

shortName used the wrong field to check against: probably due to copy/paste errors. I've updated the common fields name, and shortName to use the useValidator which uses the schema to decide which validation to apply to the fields. This should streamline the validations, and also fixes some discrepancies, because previously unique was always checked for name - but this is not necessarily correct. Eg. the schema does not define unique: true for organisationUnit and dataSets.

@Birkbjo Birkbjo requested a review from flaminic January 16, 2025 13:02
Copy link

netlify bot commented Jan 16, 2025

Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit 02c0172
🔍 Latest deploy log https://app.netlify.com/sites/dhis2-maintenance-app-beta/deploys/67890d2003c85a0008546cad
😎 Deploy Preview https://deploy-preview-494.maintenance-app-beta.netlify.dhis2.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Birkbjo Birkbjo merged commit 0ff52ee into master Jan 16, 2025
11 checks passed
@Birkbjo Birkbjo deleted the validation/use-dynamic-schema-validation branch January 16, 2025 13:56
dhis2-bot added a commit that referenced this pull request Jan 16, 2025
## [0.23.1](v0.23.0...v0.23.1) (2025-01-16)

### Bug Fixes

* **validation:** use dynamic schema validator for common fields ([#494](#494)) ([0ff52ee](0ff52ee))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 0.23.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants