Skip to content

Commit 94d0678

Browse files
authored
Merge pull request #23 from Kyash/readme
Updated Readme
2 parents 77b67f7 + 206b55f commit 94d0678

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
[![Build Status](https://circleci.com/gh/Kyash/validatable-textinput-layout.svg?style=shield)](https://circleci.com/gh/Kyash/validatable-textinput-layout/tree/master)
44
[![JitPack](https://jitpack.io/v/Kyash/validatable-textinput-layout.svg)](https://jitpack.io/#Kyash/validatable-textinput-layout)
55

6-
ValidatableTextInputLayout is the view which extended TextInputLayout to validate the input text easily for .
6+
ValidatableTextInputLayout is the view which extended TextInputLayout to validate the input text easily.
77

88
## Download
99

10-
Project build.gradle
10+
### Project build.gradle
1111

1212
```groovy
1313
allprojects {
@@ -18,12 +18,12 @@ allprojects {
1818
}
1919
```
2020

21-
App build.gradle
21+
### App build.gradle
2222

2323
```groovy
2424
dependencies {
2525
...
26-
compile 'com.kyash.vtl:validatable-textinput-layout:LATEST_VERSION'
26+
compile 'com.github.Kyash:validatable-textinput-layout:LATEST_VERSION'
2727
}
2828
```
2929

@@ -76,14 +76,14 @@ focus_changed | Validate when the focus is changed
7676
## Validators
7777
This library provides some common validators
7878

79-
Validator | Screenshot
79+
Validator | Description
8080
:--: | :--:
8181
RequiredValidator | ![required_validator.gif](art/required_validator.gif)
8282
EmailValidator | ![email_validator.gif](art/email_validator.gif)
83-
NumberOnlyValidator |
83+
NumberOnlyValidator | Number only
8484
AsciiOnlyValidator | ![ascii_validator.gif](art/ascii_validator.gif)
85-
HiraganaOnlyValidator |
86-
KatakanaOnlyValidator |
85+
HiraganaOnlyValidator | Jananese Hieragana character
86+
KatakanaOnlyValidator | Japanese Katakana character
8787

8888

8989

@@ -112,7 +112,7 @@ class MaterialDesignColorsValidator(
112112
}
113113

114114
override fun validate(text: String?): Boolean {
115-
throw UnsupportedOperationException("sync method is not arrowed because this validation uses async API response.")
115+
throw UnsupportedOperationException("Sync method is not arrowed because this validation uses async API response.")
116116
}
117117

118118
override fun getErrorMessage(): String {

library/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def versionMajor = 0
66
def versionMinor = 1
77
def versionPatch = 0
88

9-
group = 'com.kyash'
9+
group = 'co.kyash'
1010
version = "$versionMajor.$versionMinor.$versionPatch"
1111

1212
android {

library/src/main/java/co/kyash/vtl/ValidatableTextInputLayout.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ class ValidatableTextInputLayout @JvmOverloads constructor(
5151
a.recycle()
5252
}
5353

54+
val textInputAwareValidationFlowables: ArrayList<Flowable<Any>> = ArrayList()
55+
5456
private val textProcessor: FlowableProcessor<String> = PublishProcessor.create()
5557

5658
private val compositeDisposable: CompositeDisposable = CompositeDisposable()
5759

5860
private val validators: ArrayList<VtlValidator> = ArrayList()
5961

60-
private val textInputAwareValidationFlowables: ArrayList<Flowable<Any>> = ArrayList()
61-
6262
private val mainHandler: Handler = HandlerProvider.createMainHandler()
6363

6464
private val textWatcher = object : TextWatcher {
@@ -111,7 +111,6 @@ class ValidatableTextInputLayout @JvmOverloads constructor(
111111
private fun initListeners() {
112112
val editText = editText ?: return
113113

114-
// If the text has error, validation should run on realtime.
115114
if (shouldValidateOnTextChanged || shouldValidateOnTextChangedOnce) {
116115
shouldValidateOnTextChangedOnce = TextUtils.isEmpty(error)
117116
editText.removeTextChangedListener(textWatcher)

0 commit comments

Comments
 (0)