Skip to content

Commit a268784

Browse files
committed
Fix #3
Removed pixel ID length check as these are not always the same length. There is also no documentation which shapes a pixel ID can take.
1 parent b44d29e commit a268784

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

projects/pixel/src/lib/pixel.module.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,9 @@ export class PixelModule {
4141
*/
4242
private static verifyPixelId(pixelId: string): void {
4343

44-
// Regular expression for Pixel ID format (15 digits) (not yet implemented)
45-
const regex = /^\d{15}$/;
46-
47-
// TODO: Check validity of Pixel ID with a RegEx.
4844
// Have to verify first that all Pixel IDs follow the same 15 digit format
4945
if (pixelId === null || pixelId === undefined || pixelId.length === 0) {
5046
throw Error('Invalid Facebook Pixel ID. Did you pass the ID into the forRoot() function?');
51-
} else if (!regex.test(pixelId)) {
52-
throw Error('Invalid Facebook Pixel ID. The ID should consist of 15 digits.');
5347
}
5448

5549
}

0 commit comments

Comments
 (0)