diff --git a/src/lib/services/project-service.ts b/src/lib/services/project-service.ts index 8ac9b5531478..84a7b97fabe7 100644 --- a/src/lib/services/project-service.ts +++ b/src/lib/services/project-service.ts @@ -180,6 +180,12 @@ export default class ProjectService { `You've provided a feature flag naming example ("${example}") that doesn't match your feature flag naming pattern ("${pattern}"). Please provide an example that matches your supplied pattern.`, ); } + + if (!pattern && example) { + throw new BadDataError( + "You've provided a feature flag naming example, but no feature flag naming pattern. You must specify a pattern to use an example.", + ); + } } };