import { StringOrNull } from 'src/Types' ; export class MinLengthValidator implements IValidator < StringOrNull > { private minLength : number ; constructor ( minLength ) { this . minLength = minLength ; } public IsValid ( input ) { if ( ! input ) { return false ; } return input . length >= this . minLength ; } }