Including in your project
EasyValidation has a number of artifacts and modules that you can add in your project.
Core: This module contains the main classes and all the built-in rules along with the views and collection kotlin extensions for validation purposes.
Toast: This module contains all the views and collection kotlin extensions which displays
Toast
on invalid check.Snack: This module contains all the views and collection kotlin extensions which displays
Snack
on invalid check.Error: This module contains all the views and collection kotlin extensions which displays
Error
for views such asEditText
,TextInputLayout
,AutoCompleteTextView
etc.Material Components: This module contains the views and collection kotlin extensions for all the latest Material Components.
Add library through jCenter and Gradle
Add this in project's build.gradle
file:
// ...
allprojects {
repositories {
// ....
mavenCentral()
}
}
// ...
And then add this in app's build.gradle
file:
def ev_version = "1.0.2"
dependencies
{
// Core
implementation "com.wajahatkarim:easyvalidation-core:$ev_version"
// Shows Toasts by default for every validation error
implementation "com.wajahatkarim:easyvalidation-toast:$ev_version"
}
Last updated