0

Can anyone tell where I am going wrong with this password validator? It returns password invalid when it should be correct

https://code.sololearn.com/cG0Oro1rUW0J/?ref=app

15th Apr 2020, 9:14 AM
O B
O B - avatar
6 Answers
+ 3
Orla Lennon But in your code you are just checking numbers and symbols then why it will work on character.
15th Apr 2020, 9:51 AM
A͢J
A͢J - avatar
+ 2
It's working fine. Check your input once. I have entered 1234567#&
15th Apr 2020, 9:22 AM
A͢J
A͢J - avatar
+ 2
O B Ok might be it's a problem of symbol ÂŁ because when I enter Myname7# it work fine. I think that symbol doesn't has ASCII value.
15th Apr 2020, 2:40 PM
A͢J
A͢J - avatar
+ 1
O B I got problem. When I print the symbol I get ?. To check just print this and see the output. Console.WriteLine(special[y]);
15th Apr 2020, 2:45 PM
A͢J
A͢J - avatar
0
Hmm thank you A J you do seem to be right. For some reason just using 7 and £ don't seem to work for me but the other number/symbol combinations do! “Myname7£" doesn't work.
15th Apr 2020, 9:31 AM
O B
O B - avatar
0
A J . The code checks that the password has at least one number and one symbol and no spaces. Therefore "Myname7ÂŁ" should return "password created" not "password invalid" as it currently is.
15th Apr 2020, 1:46 PM
O B
O B - avatar