I'm practicing exception handling for membership registration and I have a question about validation.

Asked 2 years ago, Updated 2 years ago, 49 views

While practicing membership, look at the examples and process ID exceptions (only English characters and numbers are allowed) for(var i = 0; i='0' && ch <='9') && !(ch>='a' && ch <='z') && !(ch>='A' && ch <='Z') { alert("ID can be alphabetic, numeric only); return false; } }

I've implemented it.

I'd like to make an exception in the same way as above without using the regular expression method for passwords In addition, I want to make the password in a way that passes only when all three characters are included, but I don't know how to specify the range of special characters.

php html javascript

2022-09-22 20:58

1 Answers

Special symbols based on Unicode can be found at the URL below.

http://www.ltool.net/characters-to-unicode-charts-in-korean.php?unicode=0

! is U+0021 and . is U+002E.

'!' == '\u0021'
true

'.' '.' == '\u002E'
true

The range of special symbols commonly used by u0021 to u002E.

If you need more special symbols, you can look at the Unicode table and work on them.


2022-09-22 20:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.