{"id":18401086,"url":"https://github.com/malinkang/rxvalidator","last_synced_at":"2025-04-12T17:00:15.672Z","repository":{"id":57726413,"uuid":"70548588","full_name":"malinkang/RxValidator","owner":"malinkang","description":"A reactive form validation for android","archived":false,"fork":false,"pushed_at":"2020-11-14T06:47:47.000Z","size":4035,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-24T12:05:27.678Z","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/malinkang.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}},"created_at":"2016-10-11T02:37:11.000Z","updated_at":"2020-11-14T06:47:49.000Z","dependencies_parsed_at":"2022-09-26T21:50:44.949Z","dependency_job_id":null,"html_url":"https://github.com/malinkang/RxValidator","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/malinkang%2FRxValidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malinkang%2FRxValidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malinkang%2FRxValidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malinkang%2FRxValidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malinkang","download_url":"https://codeload.github.com/malinkang/RxValidator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239084394,"owners_count":19578773,"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-06T02:37:42.481Z","updated_at":"2025-02-16T03:25:58.899Z","avatar_url":"https://github.com/malinkang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"RxValidator is a reactive form validation  for android.\n\n![](screenshot.gif)\n\n## Usage\n\n##### Step 1 Add dependency\n\nGradle\n\n``` groovy\ncompile 'com.malinkang:rxvalidator:0.1'\napt 'com.malinkang:rxvalidator-compiler:0.1'\n```\n\n#### Step 2 Annotate your views like this:\n``` java\n  @NotEmpty(order = 1, message = \"FirstName不能为空\")\n  EditText firstName;\n```\n\n#### Step 3 start validate\n``` java\n      RxValidator.validate(this).subscribe(new Action1\u003cValidationResult\u003e() {\n            @Override\n            public void call(ValidationResult validationResult) {\n                //...\n            }\n        });\n```\n\n## All supported validation annotations\n\n* @NotEmpty\n``` java\n    @NotEmpty(order = 1, message = \"FirstName不能为空\")\n    EditText firstName;\n```\n* @MinLength and @MaxLength\n``` java\n  @MinLength(order = 6, length = 6, message = \"密码长度不能小于6\")\n  @MaxLength(order = 7, length = 12, message = \"密码长度不能大于12\")\n  EditText password;\n```\n* @RegExp\n``` java\n    @NotEmpty(order = 3, message = \"手机号不能为空\")\n    @RegExp(order = 4, message = \"请输入正确的手机号\", regexp = \"^1(3[0-9]|4[57]|5[0-35-9]|7[01678]|8[0-9])\\\\d{8}\")\n    EditText phone;\n```\n\nLicense\n-------\n\n    Copyright 2016 Linkang Ma\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalinkang%2Frxvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalinkang%2Frxvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalinkang%2Frxvalidator/lists"}