feat: ignore query string
This commit is contained in:
parent
0473c0f1af
commit
034032a316
|
|
@ -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')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue