import { applyDecorators } from '@nestjs/common';
import { Matches } from 'class-validator';

export function MatchesPersonNamesRegex() {
  const matches = Matches(/^[a-zà-ú\ ]+$/i);

  return applyDecorators(matches);
}
