{"id":21069618,"url":"https://github.com/mtarnovan/validators_ro","last_synced_at":"2025-08-13T22:21:13.558Z","repository":{"id":139552390,"uuid":"67531876","full_name":"mtarnovan/validators_ro","owner":"mtarnovan","description":"Validators for Romanian CIF, CNP and IBAN in Elixir","archived":false,"fork":false,"pushed_at":"2024-01-14T09:42:36.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T21:48:03.042Z","etag":null,"topics":["bic","cif","cnp","cui","elixir","iban","validations"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtarnovan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-06T17:37:59.000Z","updated_at":"2024-01-14T09:29:05.000Z","dependencies_parsed_at":"2024-01-14T10:58:01.177Z","dependency_job_id":null,"html_url":"https://github.com/mtarnovan/validators_ro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarnovan%2Fvalidators_ro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarnovan%2Fvalidators_ro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarnovan%2Fvalidators_ro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtarnovan%2Fvalidators_ro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtarnovan","download_url":"https://codeload.github.com/mtarnovan/validators_ro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243511007,"owners_count":20302484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bic","cif","cnp","cui","elixir","iban","validations"],"created_at":"2024-11-19T18:36:21.421Z","updated_at":"2025-03-14T02:28:13.094Z","avatar_url":"https://github.com/mtarnovan.png","language":"Elixir","readme":"# Validators for Romanian CIF, CNP and IBAN\n\n![CI status](https://github.com/mtarnovan/validators_ro/actions/workflows/elixir.yml/badge.svg?branch=master)\n\n\u003c!-- MDOC !--\u003e\n\nAn [Elixir](https://elixir-lang.org/) collection of validators and utilities\naround Romanian identifiers, extracted from [openapi.ro](https://openapi.ro),\nbusiness APIs for Romanian developers.\n\n* CNP https://ro.wikipedia.org/wiki/Cod_numeric_personal (roughly equivalent of\n  American Social Security Number SSN)\n* CIF https://ro.wikipedia.org/wiki/Cod_de_Identificare_Fiscal%C4%83 (roughly\n  equivalent of American Employer Identification Number EIN)\n* IBAN http://www.bnr.ro/files/d/Legislatie/EN/Reg_IBAN.pdf\n\nPlease note that IBAN validation is implemented per BNR specification and might\nnot work for international IBANs.\n\nFor each identifier a `valid_#{identifier}?` function is provided.\n\nAdditionaly:\n  * an infinite stream of valid CIFs is provided by `cif_stream/1`.\n  * `parse_cnp/1` allows parsing a valid CNP into constituent parts\n\n## Examples\n```elixir\n    iex\u003e import ValidatorsRo\n    iex\u003e valid_cif?(\"13548146\")\n    true\n    iex\u003e valid_cnp?(\"1920822296090\")\n    true\n    iex\u003e parse_cnp(\"1920822296090\")\n    %{parsed: %{control: \"0\", county_index: \"609\", county_of_birth: \"Prahova\",\n        county_of_birth_code: \"29\", date_of_birth: \"1992-08-22\", foreign_resident: false,\n        sex: \"m\"}, valid: true}\n    iex\u003e valid_iban?(\"RO56TREZ0462107020101XXX\")\n    true\n    iex\u003e valid_bic?(\"RZTIAT22263\")\n    true\n    iex\u003e cif_stream(10_000) |\u003e Enum.take(10)\n    [10004, 10012, 10020, 10039, 10047, 10055, 10063, 10071, 10080, 10098]\n```\n\u003c!-- MDOC !--\u003e\n\n## Installation\n\nAdd `validators_ro` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:validators_ro, git: \"https://github.com/mtarnovan/validators_ro.git\"}\n  ]\nend\n\n(Not published as a Hex package yet).\n```\n\n### LICENSE\n\nMIT LICENSE. See LICENSE for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtarnovan%2Fvalidators_ro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtarnovan%2Fvalidators_ro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtarnovan%2Fvalidators_ro/lists"}