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
TextInputLayout validation doesn't work. #35
Comments
Could you please provide more details? E.g. layout xml, code, screenshot? Thanks. |
@thyrlian I have updated above. Please have a look above. |
Thanks @rajeshkumarkhadka. Could you please tell me what's exactly wrong with the behavior? Any log? Any screenshot? Does the |
I saw this problem too while testing validation with TextInputLayout. As to what are the symptoms of it not working, basically the problem is I've tried the following: mAwesomeValidation = new AwesomeValidation(ValidationStyle.TEXT_INPUT_LAYOUT);
mAwesomeValidation.addValidation(getActivity(), R.id.usernameWrapper, Patterns.EMAIL_ADDRESS, R.string.err_email); The Fragment implements @Override
public void onClick(View v) {
if (mAwesomeValidation.validate() == true) {
//It's always executing this code even though the fields have validation issues.
}
} |
Thanks @obernal for sharing your ideas.
|
@thyrlian I have used fragment's |
Thanks @rajeshkumarkhadka. Would you please try to move the code to another place other than |
@thyrlian works on |
@rajeshkumarkhadka cool, glad to hear it's working now. As said before, if the activity is OK, most likely the view to be validated is not available yet at the given lifecycle call. |
I am trying to use this library with - support.design.widget.CoordinatorLayout as Root Layout. EditText is wrapped by TextInputLayout and there is no fragment implemented. Msg monitor shows: I guess Still not fixed or This library is meant to be used with Fragments only? |
|
Cannot resolve method 'addValidation(androidx.fragment.app.FragmentActivity, int, int)' . Error Throw |
It doesn't work with the TextInputLayout validation.
Implementation:
`
Java Code
*XML
The text was updated successfully, but these errors were encountered: