Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
430 views
in Technique[技术] by (71.8m points)

android - how to set error message below the textinputlayout in databinding using MVVM

I want to set error message below the textinput layout in databinding using MVVM in kotlin

will i was doing i encounter an error : it shows null if the email edit text is empty , it should not do that

question from:https://stackoverflow.com/questions/66065258/how-to-set-error-message-below-the-textinputlayout-in-databinding-using-mvvm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can follow this link: Can i bind an error message to a TextInputLayout?

In the second answer, you will see StringRule. By using that hopefully your problem will be fixed.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...