diff --git a/src/modules/contributors/guards/rnc-validator.guard.ts b/src/modules/contributors/guards/rnc-validator.guard.ts index ccfa4a3..27ce5fc 100644 --- a/src/modules/contributors/guards/rnc-validator.guard.ts +++ b/src/modules/contributors/guards/rnc-validator.guard.ts @@ -13,11 +13,15 @@ export class RncValidatorGuard implements CanActivate { async canActivate(context: ExecutionContext): Promise { const RNC_REQUIRED_LENGTH = 9; + const CEDULA_REQUIRED_LENGTH = 11; const request: Request = context.switchToHttp().getRequest(); const { rnc } = request.params; - if (rnc.length !== RNC_REQUIRED_LENGTH) { + if ( + rnc.length !== RNC_REQUIRED_LENGTH && + rnc.length !== CEDULA_REQUIRED_LENGTH + ) { throw new BadRequestException({ valid: false, message: 'Invalid RNC',