From e540f950c21347690884b792cace44405c839374 Mon Sep 17 00:00:00 2001 From: driveGosling Date: Tue, 15 Apr 2025 15:58:43 +0300 Subject: [PATCH 1/2] update validation error messages in schemas for improved clarity --- .../app/apps/codebattle/assets/js/widgets/formik/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/app/apps/codebattle/assets/js/widgets/formik/index.js b/services/app/apps/codebattle/assets/js/widgets/formik/index.js index 99aeec289..f81f4d4f7 100644 --- a/services/app/apps/codebattle/assets/js/widgets/formik/index.js +++ b/services/app/apps/codebattle/assets/js/widgets/formik/index.js @@ -35,7 +35,7 @@ const schemas = { ) .matches( /^[a-zA-Z]+[a-zA-Z0-9_-\s{1}][a-zA-Z0-9_]+$/i, - 'Should contain Latin letters, numbers and underscores. Only begin with latin letter', + 'Must consist of Latin letters, numbers and underscores. Only begin with latin letter', ) .trim(), clan: Yup.string() @@ -69,7 +69,7 @@ const schemas = { .max(16, 'Should be from 3 to 16 characters') .matches( /^[a-zA-Z]+[a-zA-Z0-9_-\s{1}][a-zA-Z0-9_]+$/i, - 'Should contain Latin letters, numbers and underscores. Only begin with latin letter', + 'Must consist of Latin letters, numbers and underscores. Only begin with latin letter', ) .required('Nickname required'), email: emailSchema, From 671992153a5fcebd47a5c554e7798e0758e57356 Mon Sep 17 00:00:00 2001 From: driveGosling Date: Tue, 15 Apr 2025 16:13:48 +0300 Subject: [PATCH 2/2] update validation error messages in schemas for improved clarity --- .../apps/codebattle/assets/js/__tests__/UserSettings.test.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/app/apps/codebattle/assets/js/__tests__/UserSettings.test.jsx b/services/app/apps/codebattle/assets/js/__tests__/UserSettings.test.jsx index 7026c4f97..02960e1f2 100644 --- a/services/app/apps/codebattle/assets/js/__tests__/UserSettings.test.jsx +++ b/services/app/apps/codebattle/assets/js/__tests__/UserSettings.test.jsx @@ -129,7 +129,7 @@ describe('UserSettings test cases', () => { expect( await findByText( - /Should contain Latin letters, numbers and underscores. Only begin with latin letter/i, + /Must consist of Latin letters, numbers and underscores. Only begin with latin letter/i, ), ).toBeInTheDocument(); expect(submitButton).toBeDisabled();