[go: nahoru, domu]

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

password reqs / props (txtPassword) #7

Closed
coledixon opened this issue Apr 17, 2019 · 1 comment
Closed

password reqs / props (txtPassword) #7

coledixon opened this issue Apr 17, 2019 · 1 comment
Assignees

Comments

@coledixon
Copy link
Owner

-- set PasswordChar prop (*)
-- set MaxChar prop (20)
-- require alphanumeric with at least 1 symbol

@coledixon coledixon self-assigned this Apr 17, 2019
@coledixon
Copy link
Owner Author

-- DONE.

  • build external method to dynamically toggle the PassChar prop on all txtPassword fields to display the password to the user:

public char togglePassChar(char p) { // dynamically display text or PassChar return p = (p == '*') ? '\0' : '*'; }

  • built logic to parse the user input on the password fields

`
private static bool parseNumeric(string _pw, bool _pass)
{
if (!_pw.Any(Char.IsDigit)) { _pass = false; }

        return _pass;
    }

    private static bool parseSpecialChar(string _pw, bool _pass)
    {
        var regex = new Regex("^[a-zA-Z0-9_]*$"); // regex for special chars

        if (regex.IsMatch(_pw)) { _pass = false; }

        return _pass;
    }

`

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

No branches or pull requests

1 participant