Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Composer/packages/client/src/components/QnA/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const validateUrl: FieldValidator = (url: string): string => {
let error = '';

if (url && !url.startsWith('http://') && !url.startsWith('https://')) {
error = formatMessage('A valid url should start with http:// or https://');
error = formatMessage('A valid URL should start with http:// or https://');
}

return error;
Expand All @@ -47,7 +47,9 @@ export const validateName = (sources: QnAFile[]): FieldValidator => {
let currentError = '';
if (name) {
if (!FileNameRegex.test(name)) {
currentError = formatMessage('KB name cannot contain special characters.');
currentError = formatMessage(
'A knowledge base name cannot contain spaces or special characters. Use letters, numbers, -, or _.'
);
}

const duplicatedItemIndex = sources.findIndex((item) => item.id.toLowerCase() === `${name.toLowerCase()}.source`);
Expand All @@ -59,7 +61,6 @@ export const validateName = (sources: QnAFile[]): FieldValidator => {
};
};

export const knowledgeBaseSourceUrl =
'https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/concepts/content-types';
export const knowledgeBaseSourceUrl = 'https://aka.ms/qna-data-source-content';

export const QnAMakerLearningUrl = 'https://azure.microsoft.com/en-us/pricing/details/cognitive-services/qna-maker/';
export const QnAMakerLearningUrl = 'https://aka.ms/qna-maker-pricing';