Anh Phan

Results 1 comments of Anh Phan

``` import { ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator'; import moment = require('moment'); @ValidatorConstraint() export class isDate implements ValidatorConstraintInterface { validate(value: any) { if (typeof value === 'string') { return /^[1-9]\d*-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/.test(value)...