lisawray / lisawray/passwordview

Application crashes if password field is blank with validation too

Open
#33 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
696
Forks
83
PR merge metrics
No merged PRs in 30d

Description

So i recently used this library, i basically want to add a checkpoint to my application where if user leave password empty the application sets error to the field, i used password view for password field. But when user continues without entering password the application crashes, no matter if he enters email only too, i already have check point of seterror added on the email field my email field is a simple edit text and password field is password view,i tried checking logcat and it says "Please use TextInputLayout.setError() instead!
at com.xwray.passwordview.PasswordView.setError", i tried setting the type to textinputlayout but it throws an error of casting i.e. "Unable to cast edittext on textinputlayout", below is the xml and java code of my application

![image_2022-03-11_113339](https://user-images.githubusercontent.com/101385084/157815031-270b1e6f-9309-4cfc-a689-62caade8d40f.png)
![image](https://user-images.githubusercontent.com/101385084/157815088-747bf835-3a07-4013-8ef8-c72b4c9e0b5d.png)
![image](https://user-images.githubusercontent.com/101385084/157815133-14dec0b5-3262-42de-879b-f0859506cadd.png)

image of exception
![image](https://user-images.githubusercontent.com/101385084/157815183-7c9dcd4b-9ccd-4873-be8e-96d833483156.png)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PasswordView.setError entry named in the Logcat trace and review the supplied XML and Java snippets. Reproduce validation with a blank password, including the email-only case, and determine whether the crash comes from calling setError on PasswordView. Done means blank-password validation no longer crashes and the password field displays its error correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.