{"id":19045808,"url":"https://github.com/ivanjermakov/jtrue","last_synced_at":"2025-10-16T02:32:48.233Z","repository":{"id":122487385,"uuid":"209381631","full_name":"ivanjermakov/jtrue","owner":"ivanjermakov","description":"JTrue - a Java validation library","archived":false,"fork":false,"pushed_at":"2020-04-16T09:33:24.000Z","size":646,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T08:32:47.868Z","etag":null,"topics":[],"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/ivanjermakov.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":"2019-09-18T18:50:54.000Z","updated_at":"2021-02-15T23:29:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"0cd14770-2310-44a7-ae24-3d439bfeb4a4","html_url":"https://github.com/ivanjermakov/jtrue","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanjermakov%2Fjtrue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanjermakov%2Fjtrue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanjermakov%2Fjtrue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanjermakov%2Fjtrue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanjermakov","download_url":"https://codeload.github.com/ivanjermakov/jtrue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240102192,"owners_count":19747963,"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":[],"created_at":"2024-11-08T22:51:41.410Z","updated_at":"2025-10-05T21:51:03.825Z","avatar_url":"https://github.com/ivanjermakov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JTrue: Java object validation library\n\n[![Build Status](https://img.shields.io/travis/com/ivanjermakov/jtrue/master)](https://travis-ci.com/ivanjermakov/jtrue)\n[![codecov](https://codecov.io/gh/ivanjermakov/jtrue/branch/master/graph/badge.svg)](https://codecov.io/gh/ivanjermakov/jtrue)\n[![](https://jitpack.io/v/ivanjermakov/jtrue.svg)](https://jitpack.io/#ivanjermakov/jtrue)\n\nJTrue - Java functional-style lazy object validation library.\n\n## Getting started\n### Setting up the dependency\nThe first step is to include JTrue into your project, for example, as a Gradle dependency:\n1. Add it in your root build.gradle at the end of repositories\n\n```\nallprojects {\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n        \n2. Add the dependency\n\n```\ndependencies {\n    implementation 'com.github.ivanjermakov:jtrue:Tag'\n}\n```\n        \n### Hello world\n\nLet's rule if given string is blank:\n\n```\nnew Validator\u003cString\u003e()\n        .rule(new NotBlank())\n        .validate(\"Hello, World!\");\n\n//output: true\n```\n\n### Base classes\n\nJTrue features several base classes you can use:\n\n* `Validatable`: base interface for all validators\n* `Validator`: lazy functional-style implementation of `Validatable`\n* `Rule`: smallest unit representing single validation predicate\n* `RuleResult`: `Rule`, but tested on specific instance\n\nAll of them are located in `core` package.\n\n### Predefined common-use predicates\n\nIn Hello world example, line `new Blank()` may caught your eye. It is one of predefined predicates. All of them located in `predicate` package. There are such predicates like: `Equals`, `EmptyString`, `Null` and many more.\n\n## Bugs and feedback\n[GitHub issues](https://github.com/ivanjermakov/jtrue/issues)\n\n## Documentation\n[JavaDoc](https://ivanjermakov.github.io/jtrue/docs/)\n\n## Binaries\n\nBinaries and dependency information for Maven, Gradle and others can be found on [JitPack page](https://jitpack.io/#ivanjermakov/jtrue).\n\n## Build\n\nTo build:\n\n```\n$ git clone https://github.com/ivanjermakov/jtrue.git\n$ gradle build\n```\n    \n## LICENSE\n    \n```\nMIT License\n\nCopyright (c) 2019 Ivan Ermakov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanjermakov%2Fjtrue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanjermakov%2Fjtrue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanjermakov%2Fjtrue/lists"}