Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can i show error use TextInputLayout error attribute ? #1

Open
MashudiSudonym opened this issue Mar 7, 2021 · 2 comments
Open

Can i show error use TextInputLayout error attribute ? #1

MashudiSudonym opened this issue Mar 7, 2021 · 2 comments

Comments

@MashudiSudonym
Copy link

Hi, great package.

thanks a lot for creating this package.

but I have some problems, can I show error use TextInputLayout error attribute without custom using setOnErrorValidatorListiner?
your default use the edit text error attribe it's not match with my design UI.

thanks

@rizmaulana
Copy link
Owner

Hi MashudiSudonym,

You can use error listener like this

sheenValidator.setOnErrorValidatorListener { list ->
    list.forEach {
         when(it.id){
             R.id.txt_username -> til_username.error = "Oops!... looks like your username is not valid"
             R.id.txt_password -> til_password.error = "Hmm... password is required"
                }
            }
        }

@MashudiSudonym
Copy link
Author

With you are solution.
can I use the default error text instead of custom like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants