Skip to content
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

Show password requirement error during input #3934

Merged
merged 6 commits into from
Nov 10, 2022

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Nov 3, 2022

Fixes #3907

IncredibleMegalosaurus

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

@Ashesh3 Ashesh3 requested a review from a team November 3, 2022 09:25
@Ashesh3 Ashesh3 requested a review from a team as a code owner November 3, 2022 09:25
@Ashesh3 Ashesh3 requested a review from bodhish November 3, 2022 09:25
@netlify
Copy link

netlify bot commented Nov 3, 2022

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit f3bb9c1
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/636bf8d567547d0009d475ab
😎 Deploy Preview https://deploy-preview-3934--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@vercel
Copy link

vercel bot commented Nov 3, 2022

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

Name Status Preview Updated
care-storybook ✅ Ready (Inspect) Visit Preview Nov 9, 2022 at 7:02PM (UTC)

@nihal467
Copy link
Member

nihal467 commented Nov 3, 2022

@Ashesh3 the PR LGTM, and it serve the purpose.

image

Iam marking it team discussion required since i feel like making it similar to the username validation is good, don't work on this comment until it is approved in today's EOD

@nihal467
Copy link
Member

nihal467 commented Nov 3, 2022

@Ashesh3 as we discussed in the EOD, make the requirement of password been shown similar to the username
image

@Ashesh3
Copy link
Member Author

Ashesh3 commented Nov 3, 2022

@nihal467 Done.

DarkcyanElkhound

@nihal467
Copy link
Member

nihal467 commented Nov 3, 2022

@Ashesh3
image

even if the password column is empty, it is saying confirmed. can you fix it, like someone type a single character, then only this condition start coming

@Ashesh3
Copy link
Member Author

Ashesh3 commented Nov 3, 2022

@nihal467 Done.

@nihal467
Copy link
Member

nihal467 commented Nov 8, 2022

test approved

Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

@Ashesh3 can you make a separate component or function for the validation rules, something like,

const validationRule = (valid, content) => {
return (
  <div>
      {valid ? (
        <i className="fas fa-circle-xmark text-red-500" />
      ) : (
        <i className="fas fa-circle-check text-green-500" />
      )}{" "}
      <span
        className={clsx(
          valid
            ? "text-red-500"
            : "text-primary-500"
        )}
      >
        {content}
      </span>
    </div>
)
}

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

👋 Hi, @Ashesh3,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@Ashesh3
Copy link
Member Author

Ashesh3 commented Nov 9, 2022

@Ashesh3 can you make a separate component or function for the validation rules, something like,

const validationRule = (valid, content) => {
return (
  <div>
      {valid ? (
        <i className="fas fa-circle-xmark text-red-500" />
      ) : (
        <i className="fas fa-circle-check text-green-500" />
      )}{" "}
      <span
        className={clsx(
          valid
            ? "text-red-500"
            : "text-primary-500"
        )}
      >
        {content}
      </span>
    </div>
)
}

That's a good suggestion, definitely makes the code cleaner. Done!

@sonarcloud
Copy link

sonarcloud bot commented Nov 9, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@Ashesh3 Ashesh3 removed changes required merge conflict pull requests with merge conflict labels Nov 9, 2022
@khavinshankar khavinshankar merged commit c703b65 into ohcnetwork:develop Nov 10, 2022
aeswibon pushed a commit to aeswibon/care_fe that referenced this pull request Dec 8, 2022
* Show password requirement error during input

* Improve password requirements message design

* Minor bug fix

* Show confirm password message only if not empty

* Move validation to a separate function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User Password condition to be check before form submission
4 participants