{"id":37028846,"url":"https://github.com/thedocs-io/soyuz-validator","last_synced_at":"2026-01-14T03:27:19.766Z","repository":{"id":57736318,"uuid":"128263504","full_name":"thedocs-io/soyuz-validator","owner":"thedocs-io","description":"Java bean fluent validator based on builder pattern","archived":false,"fork":false,"pushed_at":"2020-09-18T09:20:18.000Z","size":109,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-07-26T23:21:40.782Z","etag":null,"topics":["bean-validation","fluent-validation","java","validation-builder","validator"],"latest_commit_sha":null,"homepage":"","language":"Java","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/thedocs-io.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}},"created_at":"2018-04-05T20:57:47.000Z","updated_at":"2023-01-06T22:45:29.000Z","dependencies_parsed_at":"2022-08-24T14:57:19.651Z","dependency_job_id":null,"html_url":"https://github.com/thedocs-io/soyuz-validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/thedocs-io/soyuz-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedocs-io%2Fsoyuz-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedocs-io%2Fsoyuz-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedocs-io%2Fsoyuz-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedocs-io%2Fsoyuz-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedocs-io","download_url":"https://codeload.github.com/thedocs-io/soyuz-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedocs-io%2Fsoyuz-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["bean-validation","fluent-validation","java","validation-builder","validator"],"created_at":"2026-01-14T03:27:19.056Z","updated_at":"2026-01-14T03:27:19.759Z","avatar_url":"https://github.com/thedocs-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fluent validator\nAre you a `Hibernate` fan? This project is not for you.\nAre you a `JOOQ` fan? Good, spend few minutes, maybe you will like it.\n\n## Purpose\nThis java library allows you to **code** your validation logic (using builder patter).\nIt scales from simple validators to very complex ones\n\n## Simple example\nLet's define our model - `User` object with `email` property:\n```java\n@AllArgsConstructor\n@Getter\npublic static class User {\n    private String email;\n}\n```\n\nWe want to check that email is not empty and valid. Let's define our validator:\n```java\nFv.Validator\u003cUser\u003e userValidator = Fv.of(User.class)\n        .string(\"email\").notEmpty().email().b()\n        .build();\n```\n\nand validate our `User` object:\n```java\nUser user = new User(\"trololo\");\nFv.Result\u003cUser\u003e validationResult = userValidator.validate(user);\n    \nassertEquals(Fv.Result.failure(user, Err.code(\"email\").field(\"email\").value(\"trololo\").build()), validationResult);\n```\n\n[Click here to read simple example](https://github.com/thedocs-io/soyuz-validator/blob/master/src/test/java/io/thedocs/soyuz/validator/test/SimpleTest.java)\n\n## Validation builder\nStart building your validator with `Fv.of(classOfTheObjectYouAreGoingToValidate.class)`.\nUse `.string(\"string property\")` / `.integer(\"integer property\")` / etc to start coding property validation.\nUse `.b()` (alias to back) to return to main validation builder.\n\n## Complex example\nFluent validator is very flexible. It's hard to explain all features - just check the code - it should be pretty easy to understand.\nWe created the [special test](https://github.com/thedocs-io/soyuz-validator/blob/master/src/test/java/io/thedocs/soyuz/validator/test/SpringDependencyObjectValidationTest.java) which demonstrates a lot of complex features of the FluentValidator:\n\n1. Dependency injection to validator - you can inject your dao / service object and check that there are no Users with such email address\n2. Sub-object validation with another validator - you can share your validators with each other\n3. Custom validation - you can implement any validation logic you want and return `Fv.CustomResult`\n4. Validation collection of objects with item validator\n\n[Click here to read complex example](https://github.com/thedocs-io/soyuz-validator/blob/master/src/test/java/io/thedocs/soyuz/validator/test/SpringDependencyObjectValidationTest.java)\n\n## How to use\n### Maven\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.thedocs\u003c/groupId\u003e\n    \u003cartifactId\u003esoyuz-validator\u003c/artifactId\u003e\n    \u003cversion\u003e3.0.5\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n```\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    compile 'io.thedocs:soyuz-validator:3.0.5'\n}\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedocs-io%2Fsoyuz-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthedocs-io%2Fsoyuz-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthedocs-io%2Fsoyuz-validator/lists"}