Skip to content

Commit

Permalink
catch equipment_model_name and test_performed_code combinations\
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbywells52 committed Feb 11, 2025
1 parent d270e3e commit 28b69fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/app/testResults/uploads/UploadForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ export function groupErrors(
export function getErrorMessage(error: EnhancedFeedbackMessage) {
if (error.message) {
const header = error.fieldHeader;
const headerRegex = new RegExp(`(${header})`, "g");
const headerRegex = new RegExp(
`(${header} | [a-z0-9]+(?:_[a-z0-9]+){1,7})`,
"g"
);
return (
<span data-testid="error-message">
{error.message.split(headerRegex).map((value) => (
Expand Down

0 comments on commit 28b69fe

Please sign in to comment.