Skip to content

cpf-val v3 #30

@juliolmuller

Description

@juliolmuller

Version 3+ will be structured similarly yo the PHP and Python version of the packages:

  • Main component should be object-oriented, so a class should wrap the logic of validating CNPJ.
  • A CPF with repeated digits (e.g. 111.111.111-*, 222.222.222-*, 333.333.333-* and so on) is considered invalid (false)
  • Create custom errors for ALL exepcted errors.
  • Validate and parse arguments, when possible, and throw a custom TypeError.
  • The following components are now expeced to be exported from the final bundle:
    • CpfValidator (base class)
    • cpfVal (should be a bound function of the isValid method of a default instance).
    • CpfValidatorTypeError (abstract)
    • CpfValidatorInputTypeError
    • CpfValidatorException (abstract)
  • Update unit tests
  • Update documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions