fix: endswith
This commit is contained in:
parent
db0b135787
commit
a7ed9f981a
|
|
@ -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?.endsWith('.png') ||
|
||||
text?.endsWith('.jpg') ||
|
||||
text?.endsWith('.jpeg') ||
|
||||
text?.endsWith('.gif') ||
|
||||
text?.endsWith('.mp4')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue