Skip to content

Bug in IranianNationalCode #91

@ShahramNo

Description

@ShahramNo

The method IsValidIranianNationalCode() currently has a validation flaw and incorrectly accepts clearly invalid Iranian national codes.

For example, the following value is considered valid by the method, while it should be rejected:

2222222222

This value is invalid according to Iranian national code rules, since codes with all identical digits (e.g. 0000000000, 1111111111, 2222222222, etc.) are not valid national codes.

"2222222222".IsValidIranianNationalCode();

The method returns true for invalid inputs such as:

2222222222

1111111111

0000000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions