diff --git a/libraries/helpers/src/utils/valid.url.path.ts b/libraries/helpers/src/utils/valid.url.path.ts index 469f8229..fbcc0069 100644 --- a/libraries/helpers/src/utils/valid.url.path.ts +++ b/libraries/helpers/src/utils/valid.url.path.ts @@ -8,11 +8,11 @@ import { export class ValidUrlExtension implements ValidatorConstraintInterface { validate(text: string, args: ValidationArguments) { return ( - text?.endsWith('.png') || - text?.endsWith('.jpg') || - text?.endsWith('.jpeg') || - text?.endsWith('.gif') || - text?.endsWith('.mp4') + !!text?.split?.('?')?.[0].endsWith('.png') || + !!text?.split?.('?')?.[0].endsWith('.jpg') || + !!text?.split?.('?')?.[0].endsWith('.jpeg') || + !!text?.split?.('?')?.[0].endsWith('.gif') || + !!text?.split?.('?')?.[0].endsWith('.mp4') ); }