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

Feat/update user #58

Merged
merged 6 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions backend/src/middlewares/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ export const userValidationDescription = () => {
.isEmpty()
.withMessage("Фамилия не может быть пустой!"),
check("isMale")
.optional()
.optional({nullable: true })
.isBoolean()
.withMessage("Пол должен быть указан как булевое значение!"),
check("birthDate")
.optional()
.optional({nullable: true })
.isISO8601()
.toDate()
.withMessage("Неверный формат даты!"),
check("weight").optional().isFloat().withMessage("Вес должен быть числом!"),
AleksanderNekr marked this conversation as resolved.
Show resolved Hide resolved
check("height")
.optional()
.optional({nullable: true })
.isFloat()
.withMessage("Рост должен быть числом!"),
check("achievements")
.optional()
.optional({nullable: true })
.isString()
.withMessage("Достижения должны быть строкой!"),
check("healthIssues")
.optional()
.optional({nullable: true })
.isString()
.withMessage("Проблемы со здоровьем должны быть строкой!"),
];
Expand Down
Loading