{"id":21542892,"url":"https://github.com/horacehylee/spring-bean-validator","last_synced_at":"2025-03-17T23:53:33.245Z","repository":{"id":112756177,"uuid":"145325810","full_name":"horacehylee/spring-bean-validator","owner":"horacehylee","description":"Validator bean by configuration with SpEL concept prototype ","archived":false,"fork":false,"pushed_at":"2022-11-13T13:48:01.000Z","size":83,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T08:43:43.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/horacehylee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-08-19T17:55:49.000Z","updated_at":"2022-11-13T14:46:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"9feee05a-2365-4d0f-9b5e-1d4450baa004","html_url":"https://github.com/horacehylee/spring-bean-validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horacehylee%2Fspring-bean-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horacehylee%2Fspring-bean-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horacehylee%2Fspring-bean-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horacehylee%2Fspring-bean-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/horacehylee","download_url":"https://codeload.github.com/horacehylee/spring-bean-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244130283,"owners_count":20402753,"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-24T05:11:57.718Z","updated_at":"2025-03-17T23:53:33.220Z","avatar_url":"https://github.com/horacehylee.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Bean Validator\n\nA spring bean validation tool with the Spring Expression Language (SpEL), which is a powerful expression language that supports querying and manipulating an object graph at runtime.\n\nIt supports validation on various kind of Spring bean properties from String to collection of String and nested property. Multiple rules can be applied on a particular property. Conditional rule is also supported, that means the rules on a particular property will be applied only if the rule of other property is met. \n\nIt provides Spring XML configuration to set up the validation rules which make them clear to read and convenient to change with no compilation required.\n\n## Getting Started\n\nThree different kind of validators are provided in this library.\n\n| Validator           | Description                                                          | Support data type  | Conditional Rules |\n| :---                | :---                                                                 | :---               | :---              |\n| ValidationCondition | Basic validator to apply rule on properties                          | Primitive          | N                 |\n| ArrayValidator      | Apply rules from list of validators on array property                | Array \u0026 List       | N                 |\n| MapValidator        | Apply rules from list of validators on map property                  | Map                | N                 |\n| ValidationMatcher   | Apply rules only if matching property condition is met on properties | Primitive          | Y                 |\n\nEach validation result is stored in ValidationResult as property `invalid`. If validation is failed, it stores a list of ValidationFailed objects, and they will be aggregated by ValidationResultReducer to return a single ValidationResult.\n\n## Configuration\n\nValidationCondition:\n\nAssign `targetProperty` to Spring bean property.\n\nAssign validator rules on `conditions` value, multiple rules can be set with line separator `\\n`.\n\nExample:\n```\n\u003cbean id=\"basicValidator\" class=\"com.horacehylee.validator.validator.ValidationCondition\"\u003e\n    \u003cproperty name=\"targetProperty\" value=\"testObject\"/\u003e\n    \u003cproperty name=\"conditions\"\u003e\n        \u003cvalue\u003e\n            \u003c![CDATA[\n                id != null\n                num \u003e 0\n            ]]\u003e\n        \u003c/value\u003e\n    \u003c/property\u003e\n\u003c/bean\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoracehylee%2Fspring-bean-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoracehylee%2Fspring-bean-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoracehylee%2Fspring-bean-validator/lists"}