ita-social-projects / ita-social-projects/StreetCode

[API] [TC] Incorrect validation messages for empty email field

Open
#2,467 0 comments 0 reactions 1 assignee Claimed by @ovsh84 View on GitHub
(Epic#6) User Profile API bug Pri: high Sev: trivial
Dominant language
C#
Stars
27
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Image

Environment:
Windows 11, v.23H2, Google Chrome v.132.0.6834.160 (Official Build) (64-bit)

Reproducible: always

Build found: [05e0edc](https://github.com/ita-social-projects/StreetCode/commit/05e0edc05141c3dd37e129025e30c779d374e65e)

Preconditions:
1. The Postman is open
2. The user is not authenticated
3. The POST method is selected
4. Base endpoint is used: https://backend.historycode.online/api/Auth/Login

Steps to reproduce:
1. Set the email and password fields to empty values ("") in the request body:
{
"login": "",
"password": "",
"captchaToken": "validCaptcha"
}
2. Send a POST request.

Actual result:
1. The system returns status code 400 Bad Request.
2. The response body in JSON format contains two validation formats to the empty email field:
EN: “The Login field is required.”
“The Login field is not a valid e-mail address."

Expected result:

1. The system returns status code 400 Bad Request.
2. The response body in JSON format should contain only one validation message for the empty email field:
EN: "Еnter your email."
UA: "Введіть електронну адресу."

User story: [#2087](https://github.com/ita-social-projects/StreetCode/issues/2087)

Test case: #2466

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.