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

What are the affected if input with wrong symbols #78

Open
alfangr opened this issue Aug 1, 2024 · 3 comments · May be fixed by #81
Open

What are the affected if input with wrong symbols #78

alfangr opened this issue Aug 1, 2024 · 3 comments · May be fixed by #81

Comments

@alfangr
Copy link

alfangr commented Aug 1, 2024

I just want to know what the effect is if I enter the wrong symbol?. I would expect an incorrect symbol to show a warning or error such as an invalid symbol result. I've tried the demo with the space symbol but the results make no difference. Then, what is its function?

@Ennoriel
Copy link
Collaborator

Ennoriel commented Aug 2, 2024

If you enter a symbol that is not on the list, it won't be recognized as a symbol but won't be considered wrong either. The character will be treated as a normal lowercase letter.

This has been bothering me for a while. There should be a mode, if not the standard, where all non-alphabetic characters are considered as symbols.

As a French speaker, all accented letters should be treated as symbols (é, è, ê, ë...).

@deanilvincent what do you think?

@alfangr
Copy link
Author

alfangr commented Aug 2, 2024

Ah i see, will be affected to contains array value. Thanks @Ennoriel.

Agreed, it needs to be considered as symbols if it is non-alphabetic.

@deanilvincent
Copy link
Owner

deanilvincent commented Aug 21, 2024

Hi @Ennoriel & @alfangr , thank you for bringing this up. The package is currently support common symbols

const passwordStrength = (password, options = defaultOptions, allowedSymbols = "!\"#\$%&'\(\)\*\+,-\./:;<=>\?@\[\\\\\\]\^_`\{|\}~") => {

Having new symbols is actually a good feature suggestion. This will also broaden the reach of our package. We can also include different symbols from different languanges like Hebrew, Chinese, Arabic, Russian etc. We can make a PR for that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants