Skip to content

[MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation#1872

Merged
niyajali merged 11 commits intoopenMF:developmentfrom
HekmatullahAmin:MW-225
Jun 19, 2025
Merged

[MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation#1872
niyajali merged 11 commits intoopenMF:developmentfrom
HekmatullahAmin:MW-225

Conversation

@HekmatullahAmin
Copy link
Member

@HekmatullahAmin HekmatullahAmin commented Jun 11, 2025

Jira Task: MW-225

Screenshots

SignIn.SignUp.mp4

Description

What’s Achieved in This PR

  1. Implemented full Sign In and Sign Up flow
  • Covers both happy and unhappy user journeys.

  • Seamlessly transitions from input to account creation and navigation.

  1. Added robust user input validations
  • Ensures mandatory fields like name, email, and mobile number are filled.

  • Email is checked for correct format.

  • Password and confirm password must match.

  1. Improved error handling
  • All validation and API errors are now clearly presented to the user.

  • Replaced generic or null messages with user-friendly alternatives.

  • Handles unique field validation (username and mobile) with clear feedback.

  1. Password requirement hinting
  • A help card shows password rules inline before submission.

  • Prevents trial-and-error by guiding users upfront.

  1. Updated pin code validation
  • Removed strict 6-digit requirement for pin codes.

  • Allows shorter lengths to support different country formats (e.g., 4- or 5-digit codes).

  1. Country and state dropdown integration
  • Integrated stefanbinder/countries-states JSON for populating country-state mapping.

  • Countries and their respective states are loaded from countries.json and rendered as dropdowns in the signup form.

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with ./gradlew check to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@HekmatullahAmin
Copy link
Member Author

@niyajali could you please have a look here

Copy link
Collaborator

@niyajali niyajali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HekmatullahAmin Fetch Country & State from server and show as drop-down if any API available otherwise create a list of country and state and show as drop-down.

And instead of dialog for password feedback show a card below of the password indicator which should contain list of password feedback.

@niyajali
Copy link
Collaborator

niyajali commented Jun 12, 2025

And update the PR title like [MW-225] - The PR Title

@HekmatullahAmin HekmatullahAmin changed the title Mw 225 MW-225 Jun 12, 2025
@HekmatullahAmin HekmatullahAmin changed the title MW-225 [MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation, error handling, and country-state dropdown support Jun 12, 2025
@niyajali niyajali changed the title [MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation, error handling, and country-state dropdown support [MW-225] feat(auth): Implement full Sign In & Sign Up flow with validation Jun 12, 2025
@HekmatullahAmin
Copy link
Member Author

@niyajali can you have a look at here i created the interface if the want the data from json then they can create a function accordingly

@HekmatullahAmin
Copy link
Member Author

@niyajali just wanted to clarify the UX expectations here:

Would you prefer:

  • Show red outline + support text even when the field hasn't been focused yet (i.e. as soon as the screen loads),
  • Show only a *required message below each field (no red border or red support text styling),
  • Or some other validation behavior?
image

@niyajali
Copy link
Collaborator

@HekmatullahAmin What type of validation we had earlier

@HekmatullahAmin
Copy link
Member Author

@HekmatullahAmin What type of validation we had earlier

@niyajali previously it was only dialog if someone click submit it was showing the field must not be empty

@niyajali
Copy link
Collaborator

niyajali commented Jun 13, 2025

@HekmatullahAmin Okay so currently you're passing some errorMessage on the text field initially, and what is that message

@HekmatullahAmin
Copy link
Member Author

@HekmatullahAmin Okay so currently you're passing some errorMessage on the text field initially, and what is that message

yes the message are all like this field cannot be empty.
for example username is required
address line 1 connot be empty
...

and will only show if they are empty and is focusable, so if the go to another field it shouldn't show. if not focusable and the user visit the sign up screen for the first time all of those fields is going to look red with their error message.

do you want me to keep it or revert it back to before or u want sth else?

@niyajali
Copy link
Collaborator

Those error messages we're showing on the dialog right, so do not need it, revert to the original

@HekmatullahAmin
Copy link
Member Author

@niyajali I revert it and also removed the isError from composables in SignUp Screen. Previously it was passed from the SignUp screen checking if those were empty but in MifosTextField the isError was not passed.

  • So as previously there were no red error container nor error message i removed them

@HekmatullahAmin
Copy link
Member Author

@niyajali i revert those changes just one thing more how you want the behavious of PasswordStrenghtIndicator:

  • to be shown always when the user navigate to SignUpScreen?
  • or to be shown only if it is clicked in the password field and hide when user navigate to another field?

@biplab1 thanks for pointing i will fix the typos

@niyajali
Copy link
Collaborator

As we've created the indicator card those are only visible when the focus state has been changed.

@HekmatullahAmin
Copy link
Member Author

HekmatullahAmin commented Jun 16, 2025

@niyajali added the neccessary changes if looks good approve and merge

@HekmatullahAmin
Copy link
Member Author

HekmatullahAmin commented Jun 16, 2025

@biplab1 could u please resolve your requested changes and approve

@HekmatullahAmin
Copy link
Member Author

@itsPronay , @revanthkumarJ , @biplab1 when u are available have a look and resolve your conversation and kindly approve

@niyajali niyajali merged commit df938ab into openMF:development Jun 19, 2025
6 of 7 checks passed
@HekmatullahAmin HekmatullahAmin deleted the MW-225 branch August 5, 2025 15:54
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

Successfully merging this pull request may close these issues.

5 participants