{"id":18027894,"url":"https://github.com/wajahatkarim3/easyvalidation","last_synced_at":"2025-04-05T07:07:14.222Z","repository":{"id":32209955,"uuid":"131595666","full_name":"wajahatkarim3/EasyValidation","owner":"wajahatkarim3","description":":heavy_check_mark: A text and input validation library in Kotlin for Android","archived":false,"fork":false,"pushed_at":"2022-02-13T15:54:33.000Z","size":1108,"stargazers_count":397,"open_issues_count":11,"forks_count":64,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T06:08:20.204Z","etag":null,"topics":["android","android-library","kotlin","kotlin-android","kotlin-android-extensions","kotlin-extensions","kotlin-library","library","validation","validation-library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wajahatkarim3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.paypal.me/WajahatKarim/5","https://www.paypal.me/WajahatKarim/20","https://www.paypal.me/WajahatKarim/50","https://www.paypal.me/WajahatKarim/100"]}},"created_at":"2018-04-30T12:54:53.000Z","updated_at":"2025-03-23T07:03:08.000Z","dependencies_parsed_at":"2022-08-07T17:15:38.072Z","dependency_job_id":null,"html_url":"https://github.com/wajahatkarim3/EasyValidation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajahatkarim3%2FEasyValidation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajahatkarim3%2FEasyValidation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajahatkarim3%2FEasyValidation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wajahatkarim3%2FEasyValidation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wajahatkarim3","download_url":"https://codeload.github.com/wajahatkarim3/EasyValidation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299832,"owners_count":20916190,"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":["android","android-library","kotlin","kotlin-android","kotlin-android-extensions","kotlin-extensions","kotlin-library","library","validation","validation-library"],"created_at":"2024-10-30T08:13:39.642Z","updated_at":"2025-04-05T07:07:14.198Z","avatar_url":"https://github.com/wajahatkarim3.png","language":"Kotlin","funding_links":["https://www.paypal.me/WajahatKarim/5","https://www.paypal.me/WajahatKarim/20","https://www.paypal.me/WajahatKarim/50","https://www.paypal.me/WajahatKarim/100","https://www.paypal.me/WajahatKarim/10","https://www.paypal.me/WajahatKarim/15","https://www.paypal.me/WajahatKarim/25","https://www.paypal.me/WajahatKarim/2799"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cp\u003e\u003ca href=\"https://android.jlelse.eu/quickly-easily-validating-your-text-with-easy-validation-498d7eb54b0b\"\u003e\u003cimg alt=\"New in the EasyValidation\" align=\"center\" src=\"https://img.shields.io/badge/%F0%9F%93%84%20-NEW-red.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\nThe article on how this library was created is now published. You can \u003ca href=\"https://android.jlelse.eu/quickly-easily-validating-your-text-with-easy-validation-498d7eb54b0b\"\u003eread it on this link here. →\u003c/a\u003e.\n\u003c/p\u003e\u003c/div\u003e\n\n![](https://raw.githubusercontent.com/wajahatkarim3/EasyValidation/master/Art/easyvalidlogo.jpg)\n\n\n\u003ch1 align=\"center\"\u003e\u003ca href=\"https://twitter.com/intent/tweet?text=Quickly%20and%20easily%20validate%20your%20text%20and%20input%20in%20Android%20apps%20with%20this%20amazing%20library%20EasyValidation%20written%20in%20entirely%20in%20kotlin.:\u0026url=https%3A%2F%2Fgithub.com%2Fwajahatkarim3%2FEasyValidation\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/url/http/shields.io.svg?style=social\"/\u003e\n    \u003c/a\u003e\u003c/h1\u003e\n\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003c!-- AppCenter --\u003e\n    \u003ca href=\"https://appcenter.ms\"\u003e\n        \u003cimg src=\"https://build.appcenter.ms/v0.1/apps/ffd5a8a1-b026-4466-9480-787e049f2f7a/branches/master/badge\"/\u003e\n    \u003c/a\u003e    \n    \u003c!-- Bintray --\u003e\n    \u003ca href=\"https://bintray.com/wajahatkarim3/EasyValidation/com.wajahatkarim3.EasyValidation.core/_latestVersion\"\u003e\n        \u003cimg src=\"https://api.bintray.com/packages/wajahatkarim3/EasyValidation/com.wajahatkarim3.EasyValidation.core/images/download.svg\"/\u003e\n    \u003c/a\u003e\n    \u003c!-- Arsenal --\u003e\n    \u003ca href=\"https://android-arsenal.com/details/1/7109\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Android%20Arsenal-Easy%20Validation-brightgreen.svg?style=flat\"/\u003e\n    \u003c/a\u003e    \n    \u003c!-- API --\u003e\n    \u003ca href=\"https://android-arsenal.com/api?level=14\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/API-14%2B-orange.svg?style=flat\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"/\u003e\n    \u003c/a\u003e\n    \u003c!-- GitHub stars \n    \u003ca href=\"https://github.com/wajahatkarim3/EasyValidation\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/nisrulz/validatetor.svg?style=social\u0026label=Star\"/\u003e\n    \u003c/a\u003e --\u003e\n    \u003c!-- GitHub forks \n    \u003ca href=\"https://github.com/nisrulz/validatetor/fork\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/forks/nisrulz/validatetor.svg?style=social\u0026label=Fork\"/\u003e\n    \u003c/a\u003e --\u003e\n    \u003c!-- GitHub watchers \n    \u003ca href=\"https://github.com/nisrulz/validatetor\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/watchers/nisrulz/validatetor.svg?style=social\u0026label=Watch\"/\u003e\n    \u003c/a\u003e --\u003e\n    \u003c!-- Say Thanks! --\u003e\n    \u003ca href=\"https://saythanks.io/to/wajahatkarim3\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.paypal.me/WajahatKarim/5\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000\u0026amp;style=flat\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n     \u003c!-- GitHub followers \n    \u003ca href=\"https://github.com/nisrulz/validatetor\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/followers/nisrulz.svg?style=social\u0026label=Follow%20@nisrulz\"/\u003e\n    \u003c/a\u003e --\u003e\n    \u003c!-- Twitter Follow \n    \u003ca href=\"https://twitter.com/nisrulz\"\u003e\n        \u003cimg src=\"https://img.shields.io/twitter/follow/nisrulz.svg?style=social\"/\u003e\n    \u003c/a\u003e --\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤︎ by\n  \u003ca href=\"https://twitter.com/WajahatKarim\"\u003eWajahat Karim\u003c/a\u003e and\n  \u003ca href=\"https://github.com/wajahatkarim3/EasyValidation/graphs/contributors\"\u003e\n    contributors\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## ✔️ Changelog\nChanges exist in the [releases](https://github.com/wajahatkarim3/EasyValidation/releases) tab.\n\n## 💻 Installation\nAdd this in app's ```build.gradle``` file:\n\n```groovy\n   def ev_version = \"1.0.4\"\n   implementation \"com.wajahatkarim:easyvalidation-core:$ev_version\"\n\n   // Shows Toasts by default for every validation error\n   implementation \"com.wajahatkarim:easyvalidation-toast:$ev_version\"\n```\n\n## 📄 Documentation\nFull documentation is available at [Gitbook](https://wajahatkarim.gitbook.io/easyvalidation/).\n\n## ⭐️ Features\n* The Validator way validation support. - [Details](https://wajahatkarim.gitbook.io/easyvalidation/usage/untitled)\n* 30+ built-in validation rules like empty, email, credit cards, etc. - [Rules List](https://wajahatkarim.gitbook.io/easyvalidation/usage/built-in-rules)\n* Extension methods for `String`, `EditText`, `TextView`, `AutoCompleteTextView`, `TextInputLayout`, and `Spinner`. - [Details](https://wajahatkarim.gitbook.io/easyvalidation/usage/validation-using-extension-methods)\n* Multiple Validations and Checks - [Details](https://wajahatkarim.gitbook.io/easyvalidation/usage/multiple-validation-checks)\n* Collection Extension Methods for validations on multiple texts and views - [Details](https://wajahatkarim.gitbook.io/easyvalidation/usage/collection-extensions)\n* Create your own custom rules - [Details](https://wajahatkarim.gitbook.io/easyvalidation/usage/create-custom-rules)\n\n\n## ❓ Quick Usage\n\nFor example, you can validate any email `String` like this:\n```kotlin\n   var myEmailStr = \"john.doe@gmail.com\"\n   var isValid = myEmailStr.validEmail()  // isValid will be true or false\n   \n   // Or you can also validate with an error callback method\n   myEmailStr.validEmail() {\n       // This method will be called when myEmailStr is not a valid email.\n       Toast.makeText(contex, it, Toast.LENGTH_SHORT).show()\n   }\n```\nThese extension methods are also available for `String`, `EditText`, `TextView`, `AutoCompleteTextView`, `TextInputLayout`, and `Spinner`.\n```kotlin\n   var myEditText = findViewById\u003cEditText\u003e(R.id.myEditText)\n   var isValid = myEditText.nonEmpty()        // Checks if edit text is empty or not\n\n   // Or with error callback method like this\n   myEditText.nonEmpty() {\n       // This method will be called when myEditText is empty.\n       myEditText.error = it\n   }\n```\nThere are around 30+ built-in rules in the core module library. You can check all these in [Rules page](https://wajahatkarim.gitbook.io/easyvalidation/usage/built-in-rules).\nEasyValidation also supports multiple validation checks at same time using [Validator class](https://wajahatkarim.gitbook.io/easyvalidation/usage/untitled) like this:\n```kotlin\n// This example will check that whether user entered password has\n// atleast one number, one spcial character, and one upper case.\nvar txtPassword = findViewById\u003cEditText\u003e(R.id.txtPassword)\ntxtPassword.validator()\n     .nonEmpty()\n     .atleastOneNumber()\n     .atleastOneSpecialCharacters()\n     .atleastOneUpperCase()\n     .addErrorCallback { \n          txtPassword.error = it\n          // it will contain the right message. \n          // For example, if edit text is empty, \n          // then 'it' will show \"Can't be Empty\" message\n     }\n     .check()\n```\n\nFor more advanced usage, checkout the [full documentation at GitBook page](https://wajahatkarim.gitbook.io/easyvalidation/).\n\n## 💰 Donations\n\nThis project needs you! If you would like to support this project's further development, the creator of this project or the continuous maintenance of this project, feel free to donate. Your donation is highly appreciated (and I love food, coffee and beer). Thank you!\n\n**PayPal**\n\n* **[Donate $5](https://www.paypal.me/WajahatKarim/5)**: Thank's for creating this project, here's a tea (or some juice) for you!\n* **[Donate $10](https://www.paypal.me/WajahatKarim/10)**: Wow, I am stunned. Let me take you to the movies!\n* **[Donate $15](https://www.paypal.me/WajahatKarim/15)**: I really appreciate your work, let's grab some lunch!\n* **[Donate $25](https://www.paypal.me/WajahatKarim/25)**: That's some awesome stuff you did right there, dinner is on me!\n* **[Donate $50](https://www.paypal.me/WajahatKarim/50)**: I really really want to support this project, great job!\n* **[Donate $100](https://www.paypal.me/WajahatKarim/100)**: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!\n* **[Donate $2799](https://www.paypal.me/WajahatKarim/2799)**: Go buddy, buy Macbook Pro for yourself!\n\nOf course, you can also choose what you want to donate, all donations are awesome!\n\n## 👨 Developed By\n\n```\nWajahat Karim\n```\n- Website (http://wajahatkarim.com)\n- Twitter (http://twitter.com/wajahatkarim)\n- Medium (http://www.medium.com/@wajahatkarim3)\n- LinkedIn (http://www.linkedin.com/in/wajahatkarim)\n\n# 👍 How to Contribute\n1. Fork it\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\n# 📃 License\n\n    Copyright 2018 Wajahat Karim\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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwajahatkarim3%2Feasyvalidation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwajahatkarim3%2Feasyvalidation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwajahatkarim3%2Feasyvalidation/lists"}