{"id":34719006,"url":"https://github.com/lit-technology/input-validator","last_synced_at":"2026-04-22T15:38:30.811Z","repository":{"id":52450902,"uuid":"169840033","full_name":"lit-technology/input-validator","owner":"lit-technology","description":"Create extensible Android Validators.","archived":false,"fork":false,"pushed_at":"2021-04-28T22:32:54.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T12:47:33.178Z","etag":null,"topics":["android","email-validation","java","password-validation","phone-validation"],"latest_commit_sha":null,"homepage":null,"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/lit-technology.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":"2019-02-09T06:46:10.000Z","updated_at":"2021-02-10T11:45:31.000Z","dependencies_parsed_at":"2022-08-19T11:33:30.656Z","dependency_job_id":null,"html_url":"https://github.com/lit-technology/input-validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lit-technology/input-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Finput-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Finput-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Finput-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Finput-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lit-technology","download_url":"https://codeload.github.com/lit-technology/input-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lit-technology%2Finput-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32143666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["android","email-validation","java","password-validation","phone-validation"],"created_at":"2025-12-25T01:29:21.328Z","updated_at":"2026-04-22T15:38:30.806Z","avatar_url":"https://github.com/lit-technology.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Input Validator\n\n[![Release](https://jitpack.io/v/philip-bui/input-validator.svg)](https://jitpack.io/#philip-bui/input-validator)\n[![Downloads](https://jitpack.io/v/philip-bui/input-validator/month.svg)](https://jitpack.io/#philip-bui/input-validator)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/philip-bui/input-validator/blob/master/LICENSE)\n\nDesign pattern to create validators. By wrapping TextInputs with Validators, we bind validation checks to events required, only customizing error messages and validation required.\n\n* Material TextInputLayout support.\n* OnFocusChange and onTextChanged events.\n* Error messages customizable.\n* Error handling callback.\n* Provided Email Validator.\n* Provided Phone Number Validator.\n* Provided Password Validator (confirmation, upper, lower, digit, special, minimum characters).\n\n## [Demo](https://appetize.io/app/zwj3xzcy2zbtt8c78gq8yzum7g?device=nexus5\u0026scale=75\u0026orientation=portrait\u0026osVersion=6.0)\n\n## Requirements\n\n- Android SDK 8.0+\n\n## Installation\n\n```gradle\nallprojects {\n repositories {\n    jcenter()\n    maven { url \"https://jitpack.io\" }\n }\n}\ndependencies {\n    compile 'com.github.philip-bui:input-validator:1.0.0'\n}\n```\n\n## Usage\n\n```java\n  EditText email = (EditText) findViewById(R.id.email);\n  EmailValidator emailValidator = new EmailValidator(email);\n  emailValidator.setTextInputLayoutValidate(true);\n  emailValidator.setRequired(true, \"Required email address\"); // Error message on empty.\n  emailValidator.setLoseFocusValidate(true); // onFocusChange event validation binded.\n  if (emailValidator.validate()) {\n    ... // Successful validation.\n  } else {\n    ... // Unsucessful validation. Error messages / callbacks have been displayed.\n  }\n```\n\n## Customize\n\nCustomization is easy. To create new Validation logic, just extend Validator.\n\n```java\npublic class PhoneNumberValidator extends Validator {\n    public PhoneNumberValidator(EditText editText) {\n        super(editText);\n    }\n\n    @Override\n    public String onValidate(String string, Context context) {\n        if (!Patterns.PHONE.matcher(string).matches()) {\n            return context.getString(R.string.av_phone_number_is_invalid);\n        }\n        return null;\n    }\n}\n```\n\nAlternatively multiple Validators can be composed onto one ([see ConfirmPasswordValidator](https://github.com/philip-bui/input-validator/blob/master/library/src/main/java/com/nextgeneration/ConfirmPasswordValidator.java)), representing a checklist.\n\n## Customization Attributes\n\n`` validateListener `` *Default: null*\n\nInterface when a success or error validation happens. \n\n`` stopTypingValidate `` *Default: false*\n\nWhether to validate when the user stops typing. \n\n`` loseFocusValidate `` *Default: true*\n\nWhether to validate when the user changes focus FROM the field.\n\n`` showError `` *Default: true*\n\nWhether to show error messages. Useful to set false if you want to manually handle error messages.\n\n`` textInputValidate `` *Default: false*\n\nWhether to show the error message on the parent TextInputLayout. If the parent of the EditText is not a TextInputLayout, it throws an Exception when set to true.\n\n`` required `` *Default: false, \"Required field\"*\n\nWhether to return an error when empty. This is called before validate(), and also comes with a custom Error message.\n\n# License\n\nInput Validator is available under the MIT license. [See LICENSE](https://github.com/philip-bui/input-validator/blob/master/LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-technology%2Finput-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flit-technology%2Finput-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flit-technology%2Finput-validator/lists"}