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