{"id":14110278,"url":"https://github.com/rambler-digital-solutions/actix-web-validator","last_synced_at":"2025-05-15T08:08:54.297Z","repository":{"id":43176148,"uuid":"239974198","full_name":"rambler-digital-solutions/actix-web-validator","owner":"rambler-digital-solutions","description":"Rust library for providing validation mechanism to actix-web with Validator crate.","archived":false,"fork":false,"pushed_at":"2025-01-21T07:08:36.000Z","size":140,"stargazers_count":107,"open_issues_count":10,"forks_count":28,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-14T12:18:16.871Z","etag":null,"topics":["actix-web","rust","validation","validator"],"latest_commit_sha":null,"homepage":"","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/rambler-digital-solutions.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-02-12T09:32:29.000Z","updated_at":"2025-04-11T08:39:58.000Z","dependencies_parsed_at":"2024-01-08T07:57:33.396Z","dependency_job_id":"548938ba-b125-4829-938a-536726946d2b","html_url":"https://github.com/rambler-digital-solutions/actix-web-validator","commit_stats":{"total_commits":137,"total_committers":11,"mean_commits":"12.454545454545455","dds":"0.35036496350364965","last_synced_commit":"b8ffc17283e6db518669849005f45a57d8f5197b"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambler-digital-solutions%2Factix-web-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambler-digital-solutions%2Factix-web-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambler-digital-solutions%2Factix-web-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rambler-digital-solutions%2Factix-web-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rambler-digital-solutions","download_url":"https://codeload.github.com/rambler-digital-solutions/actix-web-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877967,"owners_count":21176244,"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":["actix-web","rust","validation","validator"],"created_at":"2024-08-14T10:02:45.760Z","updated_at":"2025-04-14T12:18:20.984Z","avatar_url":"https://github.com/rambler-digital-solutions.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# actix-web-validator [![Latest Version]][crates.io] [![Documentation]][docs-rs] [![Coverage]][coveralls] [![Build Status]][travis]\n\n[Latest Version]: https://img.shields.io/crates/v/actix-web-validator\n[Documentation]: https://docs.rs/actix-web-validator/badge.svg\n[docs-rs]: https://docs.rs/actix-web-validator/\n[crates.io]: https://crates.io/crates/actix-web-validator\n[Coverage]: https://coveralls.io/repos/github/rambler-digital-solutions/actix-web-validator/badge.svg?branch=master\n[coveralls]: https://coveralls.io/github/rambler-digital-solutions/actix-web-validator?branch=master\n[Build Status]: https://travis-ci.org/rambler-digital-solutions/actix-web-validator.svg?branch=master\n[travis]: https://travis-ci.org/rambler-digital-solutions/actix-web-validator\n[Validator crate]: https://crates.io/crates/validator\n\nThis crate is a Rust library for providing validation mechanism to actix-web with [Validator crate].\n\nInstallation\n============\n\nThis crate works with Cargo and can be found on\n[crates.io] with a `Cargo.toml` like:\n\n```toml\n[dependencies]\nactix-web-validator = \"6.0.0\"\nvalidator = { version = \"0.16\", features = [\"derive\"] }\nserde = { version = \"1\", features = [\"derive\"] }\n```\n\n## Supported extractors:\n* `actix_web::web::Json`\n* `actix_web::web::Query`\n* `actix_web::web::Path`\n* `actix_web::web::Form`\n* `serde_qs::actix::QsQuery` \n\n### Supported `actix_web` versions:\n* For actix-web-validator `0.*` supported version of actix-web is `1.*`\n* For actix-web-validator `1.* ` supported version of actix-web is `2.*`\n* For actix-web-validator `2.* ` supported version of actix-web is `3.*`\n* For actix-web-validator `3+ ` supported version of actix-web is `4.*`\n\n### Example:\n\n```rust\nuse actix_web::{web, App};\nuse serde::Deserialize;\nuse actix_web_validator::Query;\nuse validator::Validate;\n\n#[derive(Debug, Deserialize)]\npub enum ResponseType {\n    Token,\n    Code\n}\n\n#[derive(Deserialize, Validate)]\npub struct AuthRequest {\n    #[validate(range(min = 1000, max = 9999))]\n    id: u64,\n    response_type: ResponseType,\n}\n\n// Use `Query` extractor for query information (and destructure it within the signature).\n// This handler gets called only if the request's query string contains a `id` and\n// `response_type` fields.\n// The correct request for this handler would be `/index.html?id=1234\u0026response_type=Code\"`.\nasync fn index(info: Query\u003cAuthRequest\u003e) -\u003e String {\n    format!(\"Authorization request for client with id={} and type={:?}!\", info.id, info.response_type)\n}\n\nfn main() {\n    let app = App::new().service(\n        web::resource(\"/index.html\").route(web::get().to(index))); // \u003c- use `Query` extractor\n}\n```\n\n## License\n\nactix-web-validator is licensed under MIT license ([LICENSE](LICENSE) or http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frambler-digital-solutions%2Factix-web-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frambler-digital-solutions%2Factix-web-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frambler-digital-solutions%2Factix-web-validator/lists"}