EDM-3544 align config name validations#588
Conversation
WalkthroughThis pull request standardizes validation terminology and consolidates validation schemas. It replaces "dashes (-)" with "hyphens (-)" across localization strings and validation messages, introduces new generic name validation constants and functions, and refactors existing validators to use a unified Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
libs/i18n/locales/en/translation.json (1)
1012-1022: Reminder: Regenerate translations instead of manual edits.These translation updates align correctly with the source code changes in
validations.ts. However, as per coding guidelines,translation.jsonshould be regenerated usingnpm run i18nrather than edited manually. Please ensure these changes were made by running the i18n script, or run it now to verify consistency.As per coding guidelines: "Do not manually edit translation.json in libs/i18n/locales/en/; regenerate with
npm run i18nby adding or fixing keys in source code."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/i18n/locales/en/translation.json` around lines 1012 - 1022, The translation.json changes should not be edited by hand; run the i18n generation instead: update any keys/messages in the source validation code (look for validations.ts where these messages originate), then execute the project i18n script (npm run i18n) to regenerate libs/i18n/locales/en/translation.json so the file is consistent with validations.ts and CI linting rules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@libs/i18n/locales/en/translation.json`:
- Around line 1012-1022: The translation.json changes should not be edited by
hand; run the i18n generation instead: update any keys/messages in the source
validation code (look for validations.ts where these messages originate), then
execute the project i18n script (npm run i18n) to regenerate
libs/i18n/locales/en/translation.json so the file is consistent with
validations.ts and CI linting rules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c391be60-121d-4b38-9a39-a1ee02fcc126
📒 Files selected for processing (4)
libs/i18n/locales/en/translation.jsonlibs/ui-components/src/components/Catalog/AddCatalogItemWizard/utils.tslibs/ui-components/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsxlibs/ui-components/src/components/form/validations.ts
Some validations where incorrect or incomplete.
genericNamewhich doesn't accept dots. Max length: 63Summary by CodeRabbit
Documentation
Improvements