-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Repeated numbers in a CPF is considered invalid, although the calculated check digits indicate it is valid. CPF sequences 111.111.111-11, 222.222.222-22, 333.333.333-33, etc, should be evaluated and denied as valid ones.
Therefore, there are 2 cases that must be handled in cpf-gen package:
- If a 9-digits
prefixis provided toCpfGenerator::generateorcpf_genhelper function, it should validate if the input has repeated numbers and throw a runtime error. - If a sequence of repeated numbers are generated by accident, with or without a provided less-than-9-digits
prefixargument, it should rerun the digits generation to avoid invalid outputs.
Unit tests on these two scenarios are required.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
Ready