Skip to content

Conversation

@marwins
Copy link

@marwins marwins commented Apr 24, 2023

Globally defined vee-validate rules + Use i18n to translate rule errors

Description

Create a nuxt plugin to globally configure vee-validate.
Configuration include global rule definition + defaultMessage function to translate validation message via i18n

Related Issue

#78

Motivation and Context

The project doesn't translate form validation message

How Has This Been Tested?

I tested the code on my own project and report development to SyliusVueStorefront2Frontend fork.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@dead-playmod dead-playmod left a comment

Choose a reason for hiding this comment

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

Hey @marwins, this is a great idea, and after my quick look through everything seems fine, except that field names in login form (and I think in some other places too) aren't parsed correctly.

image

It seems to be caused by missing name prop on <ValidationProvider>, if you could fix that and resolve conflicts we could merge this PR if there isn't any other issues.

@dead-playmod dead-playmod linked an issue Jun 16, 2023 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Vee-validate validation messages are not translated

2 participants