{"id":31673160,"url":"https://github.com/kadirdemirkaya/flowvalidate","last_synced_at":"2026-01-20T17:52:58.440Z","repository":{"id":316079567,"uuid":"1061188948","full_name":"kadirdemirkaya/FlowValidate","owner":"kadirdemirkaya","description":"FlowValidate is a lightweight and streamlined validation library for .NET that simplifies model validation and reduces unnecessary code.","archived":false,"fork":false,"pushed_at":"2025-09-22T14:11:08.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-22T16:14:09.649Z","etag":null,"topics":["flowvalidate","model-validation","validation"],"latest_commit_sha":null,"homepage":"","language":"C#","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/kadirdemirkaya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2025-09-21T12:28:50.000Z","updated_at":"2025-09-22T14:10:23.000Z","dependencies_parsed_at":"2025-09-22T16:14:34.202Z","dependency_job_id":"bd684874-ccd3-4577-9f0d-70504589bf2c","html_url":"https://github.com/kadirdemirkaya/FlowValidate","commit_stats":null,"previous_names":["kadirdemirkaya/flowvalidate"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kadirdemirkaya/FlowValidate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FFlowValidate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FFlowValidate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FFlowValidate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FFlowValidate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kadirdemirkaya","download_url":"https://codeload.github.com/kadirdemirkaya/FlowValidate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kadirdemirkaya%2FFlowValidate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278886173,"owners_count":26062972,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["flowvalidate","model-validation","validation"],"created_at":"2025-10-08T03:35:58.072Z","updated_at":"2025-10-08T03:35:59.771Z","avatar_url":"https://github.com/kadirdemirkaya.png","language":"C#","readme":"## NuGet Package Information\n\n| Package | Downloads | License |\n|---------|-----------|---------|\n| [![NuGet](https://img.shields.io/nuget/v/FlowValidate)](https://www.nuget.org/packages/FlowValidate) | [![Downloads](https://img.shields.io/nuget/dt/FlowValidate)](https://www.nuget.org/packages/FlowValidate) | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/kadirdemirkaya/FlowValidate/blob/main/LICENSE.txt) |\n\n\n#### Repository\n\nYou can find the source code and contribute on [GitHub](https://github.com/kadirdemirkaya/FlowValidate)\n\n\n#### FlowValidate\n\n**FlowValidate** is a lightweight, fluent-style validation library for .NET.  \nIt provides an intuitive API for validating models, making it easy to add and enforce rules while reducing boilerplate code.\n\n\n#### Features\n\n- **Property Validation**: Validate standard properties, nested objects, and collections.  \n- **Nested \u0026 Collection Support**: Automatically validates complex types and lists.  \n- **Custom Rules**: Use `Should`, `Must`, `IsNotEmpty`, `IsEqual` or define your own logic.  \n- **Multi-error per Rule**: Single property rules can produce multiple error messages.  \n- **Reusable \u0026 Property-specific Validators**: Create modular validators like `UserNameValidator` and apply them to properties.  \n- **Async / Task-based Validation**: Rules can run asynchronously,\n- **DI Support**: Easy integration with dependency injection.  \n- **Clear Error Messages**: Provides detailed validation feedback.  \n- **Detailed Error Messages**: Provides rich validation feedback with property name, attempted value, and optional error code.\n- **Lightweight \u0026 Fast**: Optimized for high performance.  \n- **Middleware Ready**: Can validate models automatically on each request.\n\n\n#### Installation\n\nYou can install **FlowValidate** via NuGet Package Manager\n\n```bash\ndotnet add package FlowValidate\n```\n\n\n#### Injection\n\n```bash\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services.FlowValidationService(AssemblyReference.Assembly); \n\nvar app = builder.Build();\n\napp.FlowValidationApp();\n\napp.Run();\n```\n\n#### For example, we create a uservalidator \n\n##### Reusable Registry Rule\n```bash\npublic class UserNameValidator : BaseValidator\u003cstring\u003e\n{\n    public UserNameValidator()\n    {\n        RuleFor(name =\u003e name).IsNotEmpty().WithMessage(\"Name cannot be empty.\")\n                             .Length(3, 100).WithMessage(\"Name must be at least 3 characters.\");\n\n    }\n}\n```\n\n##### Nested Validator\n```bash\npublic class UserDetailsValidator : BaseValidator\u003cUserDetails\u003e\n{\n    public UserDetailsValidator()\n    {\n        RuleFor(x =\u003e x.Email).IsEmail().WithMessage(\"Email is invalid.\");\n        RuleFor(x =\u003e x.Phone).MatchesRegex(@\"^\\d{10}$\").WithMessage(\"Phone must be 10 digits.\");\n    }\n}\n```\n\n##### Collection Validator\n```bash\npublic class UserBasketValidator : BaseValidator\u003cUserBasket\u003e\n{\n    public UserBasketValidator()\n    {\n        RuleFor(x =\u003e x.Name).IsNotEmpty();\n        RuleFor(x =\u003e x.Count).IsGreaterThan(0);\n    }\n}\n```\n\n##### Main User Validator\n```bash \npublic class UserValidator : BaseValidator\u003cUser\u003e\n{\n    public UserValidator()\n    {\n        // Registry rule\n        ValidateRegistryRules(u =\u003e u.Name, new UserNameValidator());\n\n        // Nested validator\n        ValidateNested(u =\u003e u.Details, new UserDetailsValidator());\n\n        // Collection validator\n        ValidateCollection(u =\u003e u.Baskets, new UserBasketValidator(), item =\u003e item);\n\n        // Custom validation with Should\n        RuleFor(u =\u003e u.Nickname)\n            .Should((nickname, addError) =\u003e\n            {\n                if (!string.IsNullOrEmpty(nickname))\n                {\n                    if (nickname.Length \u003c 3)\n                        addError(\"Nickname must be at least 3 characters long.\");\n                    if (nickname.Contains(\" \"))\n                        addError(\"Nickname cannot contain spaces.\");\n                }\n            });\n    }\n}\n```\n\n##### Using the Validator\n```bash\nvar user = new User\n{\n    Name = \"Jo\",\n    Age = 25,\n    Details = new UserDetails { Email = \"invalid-email\", Phone = \"12345\" },\n    Baskets = new List\u003cUserBasket\u003e\n    {\n        new UserBasket { Name = \"\", Count = 0 },\n        new UserBasket { Name = \"Apple\", Count = 3 }\n    }\n};\n\nvar validator = new UserValidator();\nvar result = validator.Validate(user);\n```\n\nFor more examples and unit tests, check the [FlowValidate.Test](https://github.com/kadirdemirkaya/FlowValidate/tree/main/test/FlowValidate.Test) project in the repository.  \n\n- [API Examples](https://github.com/kadirdemirkaya/FlowValidate/tree/main/test/FlowValidate.Api)  \n- [Console Examples](https://github.com/kadirdemirkaya/FlowValidate/tree/main/test/FlowValidate.Console)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fflowvalidate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkadirdemirkaya%2Fflowvalidate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkadirdemirkaya%2Fflowvalidate/lists"}