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

Update positive amount error message on Admin panel forms #1889

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

ani-kalpachka
Copy link
Member

@ani-kalpachka ani-kalpachka commented Jul 21, 2024

The changes will close #1786 and update positive amount error message on all forms in the Admin panel.

@ani-kalpachka ani-kalpachka added area: i18n Translation related issues area: admin labels Jul 21, 2024
@@ -66,7 +66,7 @@ const validationSchema: yup.SchemaOf<CampaignAdminCreateFormData> = yup
title: yup.string().trim().min(10).max(200).required(),
slug: yup.string().trim().min(10).max(200).optional(),
description: yup.string().trim().min(50).max(60000).required(),
targetAmount: yup.number().integer().positive().required(),
targetAmount: yup.number().integer().positive('validation:positive-amount').required(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use the t() function: positive(t('...'))

Or this is done somehow automatically?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slavcho Yes, the translation is accessible in the validationSchema const without the t() function. All of the validation messages are displayed in this way and I kept the consistency.

@slavcho slavcho merged commit 5541e55 into master Jul 24, 2024
14 checks passed
@slavcho slavcho deleted the update-positive-amount-error-message branch July 24, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: admin area: i18n Translation related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate error message to bulgarian on create new money transfer
2 participants