From a0bbfb43b045249e1326e13b5abac5b9c50a2420 Mon Sep 17 00:00:00 2001 From: Mustafa Mulla Date: Tue, 3 Mar 2026 15:39:58 +0530 Subject: [PATCH 1/2] Improve invalid pinLabel error message --- lib/utils/filterPinLabels.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/filterPinLabels.ts b/lib/utils/filterPinLabels.ts index ad4ab0f3b..1f7ce767f 100644 --- a/lib/utils/filterPinLabels.ts +++ b/lib/utils/filterPinLabels.ts @@ -34,7 +34,7 @@ export function filterPinLabels( validLabels.push(label) } else { invalidPinLabelsMessages.push( - `Invalid pin label: ${pin} = '${label}' - excluding from component. Please use a valid pin label.`, + `Invalid pin label: ${pin} = '${label}' - excluding from component. Pin labels can only contain letters, numbers and underscores.`, ) } } From 13a44cf4a66b7819db94f2368a0b77dadb6781a0 Mon Sep 17 00:00:00 2001 From: Mustafa Mulla Date: Tue, 3 Mar 2026 15:45:24 +0530 Subject: [PATCH 2/2] update --- tests/components/normal-components/chip-invalid-pin.test.tsx | 2 +- tests/repro/chip-pinlabel-leading-space.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/components/normal-components/chip-invalid-pin.test.tsx b/tests/components/normal-components/chip-invalid-pin.test.tsx index db76b1ef0..ae28fa665 100644 --- a/tests/components/normal-components/chip-invalid-pin.test.tsx +++ b/tests/components/normal-components/chip-invalid-pin.test.tsx @@ -28,7 +28,7 @@ test("chip with invalid pin should be skipped", async () => { expect(source_property_ignored_warning).toHaveLength(1) expect(source_property_ignored_warning[0].message).toContain( - "Invalid pin label: pin3 = '//' - excluding from component. Please use a valid pin label.", + "Invalid pin label: pin3 = '//' - excluding from component. Pin labels can only contain letters, numbers and underscores.", ) expect(circuit).toMatchSchematicSnapshot(import.meta.path) diff --git a/tests/repro/chip-pinlabel-leading-space.test.tsx b/tests/repro/chip-pinlabel-leading-space.test.tsx index ea0f70c56..176463751 100644 --- a/tests/repro/chip-pinlabel-leading-space.test.tsx +++ b/tests/repro/chip-pinlabel-leading-space.test.tsx @@ -18,6 +18,6 @@ test("chip pinLabels should not allow leading or trailing spaces", async () => { expect(schematic_errors).toHaveLength(1) expect(schematic_errors[0].message).toContain( - "Invalid pin label: pin1 = 'A1 ' - excluding from component. Please use a valid pin label.", + "Invalid pin label: pin1 = 'A1 ' - excluding from component. Pin labels can only contain letters, numbers and underscores.", ) })