Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-warehouse): fix broken grammar in new-source required-field errors (#80608)

Tom Owers2422134abfaf
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx
index 6980f40790e2..df4e04d0ce93 100644
--- a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx
+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardLogic.tsx
@@ -3923,7 +3923,7 @@ export const getErrorsForFields = (
if (!hasOptionFields) {
if (field.required && !valueObj[field.name]) {
- errorsObj[field.name] = `Please select a ${field.label.toLowerCase()}`
+ errorsObj[field.name] = `${field.label} is required`
}
} else {
errorsObj[field.name] = {}
@@ -3951,7 +3951,7 @@ export const getErrorsForFields = (
if ('required' in field && field.required && valueMissing) {
errorsObj[field.name] = Array.isArray(fieldValue)
? `Please enter at least one of your ${field.label.toLowerCase()}`
- : `Please enter a ${field.label.toLowerCase()}`
+ : `${field.label} is required`
}
}
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardValidation.test.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardValidation.test.ts
index 20ca323dc94b..c5edd32a88e4 100644
--- a/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardValidation.test.ts
+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/sourceWizardValidation.test.ts
@@ -19,7 +19,7 @@ describe('source wizard multi-value fields', () => {
// with zero repositories selected.
it.each([
[[], 'Please enter at least one of your repositories'],
- [undefined, 'Please enter a repositories'],
+ [undefined, 'Repositories is required'],
[['posthog/posthog'], undefined],
])('required multi field with value %p yields error %p', (value, expectedError) => {
const errors = getErrorsForFields([REPOSITORIES_FIELD], {
diff --git a/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceWizardLogic.test.ts b/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceWizardLogic.test.ts
index 7c367017544b..61cc71a9aac2 100644
--- a/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceWizardLogic.test.ts
+++ b/products/data_warehouse/frontend/scenes/NewSourceScene/tests/sourceWizardLogic.test.ts
@@ -651,7 +651,7 @@ describe('sourceWizardLogic', () => {
{ prefix: 'src', payload: { host: '' }, access_method: 'direct' },
{ allowBlankSensitiveFields: true }
)
- expect(res.payload.host).toBe('Please enter a host')
+ expect(res.payload.host).toBe('Host is required')
})
})