Skip to content

RUTs with missing thousands separators are validated as true #4

@piris-jose

Description

@piris-jose

Describe the bug
As described in the title.

To Reproduce
Consider the following piece of code:

let rut = "11111.111-1" // An incorrect way to describe the RUT "11.111.111-1"
console.log(rutlib.validateRut(rut))

When running it, it prints "true"

Expected behavior
It must print "false" because the first (from left to right) thousands separator is missing.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox
  • Version 131.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-fixIndicates a bug or issue that requires a fix or correction.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions