codebattle icon indicating copy to clipboard operation
codebattle copied to clipboard

Bug: Hyphen (`-`) is not recognized as a special character during password registration

Open Chawku opened this issue 4 months ago • 1 comments

Summary

When trying to register with a password that includes a hyphen (-), the system shows an error:

"Password should contain at least one special character"

Although the hyphen is a special character, it is not accepted.

Version: 2816702

Reproduction steps

1. Go to https://codebattle.hexlet.io/
2. Click on "Sign up"
3. Enter a password that contains letters, numbers, and a hyphen (e.g., `Password1234-`) 
4. Click "Submit"

Expected result

A password containing a hyphen (-) should be considered valid as it includes a special character.

Actual result

The error message appears:

"Should contain at least one special character"

Image

Browsers

Chrome

OS

Windows

Chawku avatar Sep 30 '25 15:09 Chawku

  • summary: The "-" sign is not considered as a special character while creating a password
  • environment: Yandex: 25.10.1.1136 ОS: Windows 11 24H2 26100.7171 Current version: 4df7e60
  • steps-to-reproduce: 1 Click "Sign In" 2 Fill out the registration form (Nickname=MAriinaa, [email protected], Password, Password Confirmation=xj4-GFb-QcK-9Mr2) 3 Click "Submit"
  • expected-result: The system accepts this password. The "-" sign is read as a special character
  • actual-result: The system does not accept this password, an error message appears
Image

ksenrika avatar Nov 26 '25 15:11 ksenrika