From c9217dfd2026ffe55c7e7894beb6e57fb4b457d8 Mon Sep 17 00:00:00 2001 From: kitdim Date: Sun, 9 Jun 2024 22:05:32 +0300 Subject: [PATCH 1/3] remove unique constrain to name workspace --- .../typoreporter/domain/workspace/Workspace.java | 1 - ...-remove-unique-constraint-to-name-workspace.xml | 14 ++++++++++++++ .../resources/db/changelog/db.changelog-master.xml | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/db/changelog/changesets/2024/05/2024-05-31-remove-unique-constraint-to-name-workspace.xml diff --git a/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java b/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java index 01ea2348..853b671e 100644 --- a/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java +++ b/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java @@ -45,7 +45,6 @@ public class Workspace extends AbstractAuditingEntity implements Identifiable + + + + + + + + diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml index c2ff7c16..b5485266 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -23,4 +23,6 @@ relativeToChangelogFile="true" /> + From fb6fcbd6f91b41f93fd6051c946b6e99ee0bb138 Mon Sep 17 00:00:00 2001 From: kitdim Date: Sun, 9 Jun 2024 22:05:32 +0300 Subject: [PATCH 2/3] remove unique constrain to name workspace --- .../typoreporter/domain/workspace/Workspace.java | 1 - ...-remove-unique-constraint-to-name-workspace.xml | 14 ++++++++++++++ .../resources/db/changelog/db.changelog-master.xml | 2 -- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/db/changelog/changesets/2024/05/2024-05-31-remove-unique-constraint-to-name-workspace.xml diff --git a/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java b/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java index 2e070359..abf75862 100644 --- a/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java +++ b/src/main/java/io/hexlet/typoreporter/domain/workspace/Workspace.java @@ -45,7 +45,6 @@ public class Workspace extends AbstractAuditingEntity implements Identifiable + + + + + + + + diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml index d0c22842..c2ff7c16 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -23,6 +23,4 @@ relativeToChangelogFile="true" /> - From 7b608b15a4ea5d2d7090bb7e101f45018e43a802 Mon Sep 17 00:00:00 2001 From: kitdim Date: Wed, 23 Oct 2024 01:12:50 +0300 Subject: [PATCH 3/3] [#314]. Add a detailed description of the error. --- .../typoreporter/domain/account/constraint/AccountUsername.java | 2 +- src/main/resources/messages_en.properties | 1 + src/main/resources/messages_ru.properties | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/hexlet/typoreporter/domain/account/constraint/AccountUsername.java b/src/main/java/io/hexlet/typoreporter/domain/account/constraint/AccountUsername.java index 7520cca1..5c15275f 100644 --- a/src/main/java/io/hexlet/typoreporter/domain/account/constraint/AccountUsername.java +++ b/src/main/java/io/hexlet/typoreporter/domain/account/constraint/AccountUsername.java @@ -13,7 +13,7 @@ import java.lang.annotation.Target; @NotBlank -@Pattern(regexp = "^[-_A-Za-z0-9]*$") +@Pattern(regexp = "^[-_A-Za-z0-9]*$", message = "{alert.username-wrong-format}") @Size(min = 2, max = 20) @Constraint(validatedBy = {}) @Target({ElementType.FIELD, ElementType.PARAMETER}) diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index f7e8cac9..49433714 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -111,6 +111,7 @@ btn.delete-from-wks=Delete from workspace alert.password-wrong-format=Password must be between 8 and 20 characters \ and contain only latin letters, digits and symbols ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ alert.passwords-dont-match=Confirmation does not match the password +alert.username-wrong-format=The username must follow the ^[-_A-Za-z0-9]*$ pattern, that is, it must contain only Latin letters (in any case), numbers, hyphens and underscores. text.heroes=The free service for sending messages about typos in the text on your website. After adding a widget to your site, visitors have the opportunity to highlight an error or typo and report it to the administrator. text.features-header=FixIT helps websites diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties index e98ccbc4..31ec8f37 100644 --- a/src/main/resources/messages_ru.properties +++ b/src/main/resources/messages_ru.properties @@ -109,6 +109,7 @@ alert.password-wrong-format=Пароль должен быть от 8 до 20 с \ и содержать только буквы латинского алфавита,\ \ цифры и символы ~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/ alert.passwords-dont-match=Подтверждение не совпадает с паролем +alert.username-wrong-format=Имя должно соответствовать шаблону ^[-_A-Za-z0-9]*$, то есть содержать только буквы латинского алфавита (в любом регистре), цифры, дефисы и подчеркивания. text.heroes=Бесплатный сервис для отправки сообщений об ошибках в тексте на Вашем сайте. После добавлении на ваш сайт виджета посетители имеют возможность выделить ошибку или опечатку и сообщить об этом администратору. text.features-header=FixIT помогает сайтам