import {
  ValidatorConstraint,
  ValidatorConstraintInterface,
} from 'class-validator';

@ValidatorConstraint({ name: 'IsIranMobile', async: false })
export class IsIranMobile implements ValidatorConstraintInterface {
  validate(value: string) {
    return /^09[0-9]{9}$/.test(value);
  }
}
