import { PropertyValidator } from "../PropertyValidator" ; import { UrlOptions } from "../../shared/UrlOptions" ; import * as validatorJS from "validator" ; export class IsUrlValidator implements PropertyValidator < string > { constructor ( private urlOptions ? ) { } isValid ( input ) { if ( input ) { return validatorJS . isURL ( input , this . urlOptions ) ; } return false ; } }