{"id":23200746,"url":"https://github.com/jsgm/spain-vat-id","last_synced_at":"2026-03-04T07:02:42.650Z","repository":{"id":57668014,"uuid":"474519874","full_name":"jsgm/spain-vat-id","owner":"jsgm","description":"Spanish VAT ID numbers validation/verification","archived":false,"fork":false,"pushed_at":"2025-10-26T18:02:00.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T10:36:51.410Z","etag":null,"topics":["dni","nie","nif","spain","validation","vat"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/spain-vat-id","language":"Rust","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/jsgm.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-27T02:57:02.000Z","updated_at":"2025-10-26T18:04:37.000Z","dependencies_parsed_at":"2025-10-27T10:26:35.570Z","dependency_job_id":"f64e93dc-eba5-48a0-adb8-d628c4c00695","html_url":"https://github.com/jsgm/spain-vat-id","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jsgm/spain-vat-id","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsgm%2Fspain-vat-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsgm%2Fspain-vat-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsgm%2Fspain-vat-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsgm%2Fspain-vat-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsgm","download_url":"https://codeload.github.com/jsgm/spain-vat-id/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsgm%2Fspain-vat-id/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dni","nie","nif","spain","validation","vat"],"created_at":"2024-12-18T15:12:24.690Z","updated_at":"2026-03-04T07:02:42.645Z","avatar_url":"https://github.com/jsgm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spain-vat-id\n![Build](https://github.com/jsgm/spain-vat-id/actions/workflows/rust.yml/badge.svg)\n[![Crate](https://img.shields.io/crates/v/spain-vat-id.svg)](https://crates.io/crates/spain-vat-id)\n![Minimum rustc version](https://img.shields.io/badge/rustc-1.59+-lightgray.svg)\n![Last Commit](https://img.shields.io/github/last-commit/jsgm/spain-vat-id)\n\nA dead simple crate for validating/verifying Spanish VAT ID numbers written in [Rust](https://rust-lang.org).\n\nThis crate allows you to easily check and verify the following ID numbers:\n- Documento Nacional de Identidad (DNI)\n- Número de Identificación Fiscal (NIF)\n- Número de Identificación de Extranjero (NIE)\n\n## Installation\n```\ncargo add spain-vat-id\n```\n\n## Functions\n```rust\nnif_check_digit(val: u32) -\u003e char\nis_valid_nie(v: \u0026str) -\u003e (bool, String)\nis_valid_nif(v: \u0026str) -\u003e (bool, String)\n```\n\n```rust\n// NIF checking\nlet nif = \"9874`457T\";\nlet (valid, explain) = is_valid_nif(nif);\nif !valid{\n    println!(\"{}\", explain);\n    // Not valid: Char '`' at position 5 is not a number\n}\n```\n\n## Contributors\nSpecial thanks to [@dev-ardi](https://github.com/dev-ardi) for a rework and improvements.\n\n## References\n- https://en.wikipedia.org/wiki/VAT_identification_number\n- https://es.wikipedia.org/wiki/N%C3%BAmero_de_identificaci%C3%B3n_fiscal\n- https://es.wikipedia.org/wiki/N%C3%BAmero_de_identidad_de_extranjero\n- http://www.interior.gob.es/web/servicios-al-ciudadano/dni/calculo-del-digito-de-control-del-nif-nie\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsgm%2Fspain-vat-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsgm%2Fspain-vat-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsgm%2Fspain-vat-id/lists"}