ani1609 / Spendwise

Spendwise - Your User-Friendly Expense Tracker
https://spendwise-seven.vercel.app/
MIT License
27 stars 50 forks source link

Implementing Validation and Error Handling in Signup Form #314

Closed ayann07 closed 6 months ago

ayann07 commented 6 months ago

Pull Request

Related Issues: [List any related issues or reference them using the syntax #issue_number.] Fixes #(issue number) issue number : #229 Description: [Provide a brief description of your changes.] I have implemented validation of password and name fields. Checklist:

Screenshots: [If applicable, include screenshots to help reviewers understand your changes.] verification

I have worked on this under KWOC 2023.

vercel[bot] commented 6 months ago

Someone is attempting to deploy a commit to a Personal Account owned by @ani1609 on Vercel.

@ani1609 first needs to authorize it.

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spendwise ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2024 10:06am
spendwise-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 1, 2024 10:06am
ani1609 commented 6 months ago

@ayann07 seems like there is an error. the error message is show before even filling up the form

https://github.com/ani1609/Spendwise/assets/89239354/896dd962-4dce-4c17-899b-8deee4cbaaf3

ayann07 commented 6 months ago

It is not an error message,I just displayed it earlier only so that user knows the conditions while setting the password.

ayann07 commented 6 months ago

If you want I can render it afterwards, but I had seen on many sign up forms that the instructions for setting up password are already mentioned for user.

ani1609 commented 6 months ago

@ayann07 well, your view is quite logical and yeah we should have a early message to the users. But can you like change the ui, currently this looks like the user is prompted with an error even before filling the form. And also use a delayed animation fr rendering it

ayann07 commented 6 months ago

I have now made the necessary changes, please check adn let me know if there require anymore improvement. Screenshot (882)

ani1609 commented 6 months ago

@ayann07 this type of design is causing overflowing issues for screens with lower heights and thats is quite expected if we keep the hint that long. In order to deal with this problem, lets just keep the criteria simpler (only 8 characters required will be the condition) and prompt the hint in password input placeholder and keep the error message same as that of non matched passwords and existing users error.

Consider the following follow ups

Screenshot 2024-01-01 at 1 14 20 PM Screenshot 2024-01-01 at 1 14 29 PM
ayann07 commented 6 months ago

Now I have done the changes, please check.

ani1609 commented 6 months ago

@ayann07 your changes have a bug. I just entered an invalid password, it should be the error, but still i got my account created.

ani1609 commented 6 months ago

@ayann07 and please try to keep the red coloured error in a single line and as mentioned earlier in the images. Also keep the validation check only for 8 characters and not any uppercase or lowercase or special characters

ayann07 commented 6 months ago

Should I remove the upper case lower case validation?

ayann07 commented 6 months ago

The issue raised said that the password should incorporate the upper,lower special and numeric characters

ani1609 commented 6 months ago

@ayann07 yeah i am very well aware of that but as we saw, fitting such a long prompt is a bit inconvenient. So keep the checking for >=8 characters as of now

ayann07 commented 6 months ago

Now you may check, I have removed the bug and implemented the only check for length to the password field.

ani1609 commented 6 months ago

@ayann07 appreciated