All Projects → wajahatkarim3 → Easyvalidation

wajahatkarim3 / Easyvalidation

Licence: apache-2.0
✔️ A text and input validation library in Kotlin for Android

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Easyvalidation

Php Validate
Lightweight and feature-rich PHP validation and filtering library. Support scene grouping, pre-filtering, array checking, custom validators, custom messages. 轻量且功能丰富的PHP验证、过滤库。支持场景分组,前置过滤,数组检查,自定义验证器,自定义消息。
Stars: ✭ 225 (-31.4%)
Mutual labels:  validation, validation-library, library
Lcformvalidation
Javascript based form validation library, third party library / framework agnostic.
Stars: ✭ 58 (-82.32%)
Mutual labels:  validation, validation-library, library
Inapppy
Python In-app purchase validator for Apple AppStore and GooglePlay.
Stars: ✭ 110 (-66.46%)
Mutual labels:  validation, library
Typescript Runtime Type Benchmarks
Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
Stars: ✭ 119 (-63.72%)
Mutual labels:  validation, validation-library
Deep Waters
🔥Deep Waters is an easy-to-compose functional validation system for javascript developers 🔥
Stars: ✭ 188 (-42.68%)
Mutual labels:  validation, validation-library
Fluidvalidator
General purpose validation system for objects, nested objects, enumerables written in Swift
Stars: ✭ 89 (-72.87%)
Mutual labels:  validation, validation-library
Validator Collection
Python library of 60+ commonly-used validator functions
Stars: ✭ 91 (-72.26%)
Mutual labels:  validation, validation-library
Validatetor
Android library for fast and simple string validation
Stars: ✭ 136 (-58.54%)
Mutual labels:  validation, library
Restless
Express.js api, type safe validations and more
Stars: ✭ 32 (-90.24%)
Mutual labels:  validation, library
Password Validator
Validates password according to flexible and intuitive specification
Stars: ✭ 224 (-31.71%)
Mutual labels:  validation, validation-library
Svelte Forms Lib
📝. A lightweight library for managing forms in Svelte
Stars: ✭ 238 (-27.44%)
Mutual labels:  validation, library
Vee Validate
✅ Form Validation for Vue.js
Stars: ✭ 8,820 (+2589.02%)
Mutual labels:  validation, validation-library
thai-citizen-id-validator
🦉 Validate Thai Citizen ID with 0 dependencies 🇹🇭
Stars: ✭ 35 (-89.33%)
Mutual labels:  validation, validation-library
Validator
Drop in user input validation for your iOS apps.
Stars: ✭ 1,444 (+340.24%)
Mutual labels:  validation, validation-library
Laravel Vue Validator
Simple package to display error in vue from laravel validation
Stars: ✭ 32 (-90.24%)
Mutual labels:  validation, validation-library
Ratifier
Ratifier is a form validation library for Android.
Stars: ✭ 123 (-62.5%)
Mutual labels:  validation, library
Govalidator
[Go] Package of validators and sanitizers for strings, numerics, slices and structs
Stars: ✭ 5,163 (+1474.09%)
Mutual labels:  validation, validation-library
Accord
Accord: A sane validation library for Scala
Stars: ✭ 519 (+58.23%)
Mutual labels:  validation, library
Validot
Validot is a performance-first, compact library for advanced model validation. Using a simple declarative fluent interface, it efficiently handles classes, structs, nested members, collections, nullables, plus any relation or combination of them. It also supports translations, custom logic extensions with tests, and DI containers.
Stars: ✭ 198 (-39.63%)
Mutual labels:  validation, validation-library
valify
Validates data in JavaScript in a very simple way
Stars: ✭ 13 (-96.04%)
Mutual labels:  validation, validation-library

New in the EasyValidation  The article on how this library was created is now published. You can read it on this link here. →.


Built with ❤︎ by Wajahat Karim and contributors


✔️ Changelog

Changes exist in the releases tab.

💻 Installation

Add this in app's build.gradle file:

   implementation "com.wajahatkarim3.easyvalidation:easyvalidation-core:1.0.1"

📄 Documentation

Full documentation is available at Gitbook.

⭐️ Features

  • The Validator way validation support. - Details
  • 30+ built-in validation rules like empty, email, credit cards, etc. - Rules List
  • Extension methods for String, EditText, TextView, AutoCompleteTextView, TextInputLayout, and Spinner. - Details
  • Multiple Validations and Checks - Details
  • Collection Extension Methods for validations on multiple texts and views - Details
  • Create your own custom rules - Details

❓ Quick Usage

For example, you can validate any email String like this:

   var myEmailStr = "[email protected]"
   var isValid = myEmailStr.validEmail()  // isValid will be true or false
   
   // Or you can also validate with an error callback method
   myEmailStr.validEmail() {
       // This method will be called when myEmailStr is not a valid email.
       Toast.makeText(contex, it, Toast.LENGTH_SHORT).show()
   }

These extension methods are also available for String, EditText, TextView, AutoCompleteTextView, TextInputLayout, and Spinner.

   var myEditText = findViewById<EditText>(R.id.myEditText)
   var isValid = myEditText.nonEmpty()        // Checks if edit text is empty or not

   // Or with error callback method like this
   myEditText.nonEmpty() {
       // This method will be called when myEditText is empty.
       myEditText.error = it
   }

There are around 30+ built-in rules in the core module library. You can check all these in Rules page. EasyValidation also supports multiple validation checks at same time using Validator class like this:

// This example will check that whether user entered password has
// atleast one number, one spcial character, and one upper case.
var txtPassword = findViewById<EditText>(R.id.txtPassword)
txtPassword.validator()
     .nonEmpty()
     .atleastOneNumber()
     .atleastOneSpecialCharacters()
     .atleastOneUpperCase()
     .addErrorCallback { 
          txtPassword.error = it
          // it will contain the right message. 
          // For example, if edit text is empty, 
          // then 'it' will show "Can't be Empty" message
     }
     .check()

For more advanced usage, checkout the full documentation at GitBook page.

💰 Donations

This 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!

PayPal

  • Donate $5: Thank's for creating this project, here's a tea (or some juice) for you!
  • Donate $10: Wow, I am stunned. Let me take you to the movies!
  • Donate $15: I really appreciate your work, let's grab some lunch!
  • Donate $25: That's some awesome stuff you did right there, dinner is on me!
  • Donate $50: I really really want to support this project, great job!
  • Donate $100: You are the man! This project saved me hours (if not days) of struggle and hard work, simply awesome!
  • Donate $2799: Go buddy, buy Macbook Pro for yourself!

Of course, you can also choose what you want to donate, all donations are awesome!

👨 Developed By

Wajahat Karim

👍 How to Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

📃 License

Copyright 2018 Wajahat Karim

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].