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(Forms): deprecate Ajv validationRule in FormError and deprecate errorMessages keys like pattern in favor of Eufemia translation keys like Field.errorPattern #4162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tujoworker
Copy link
Member

@tujoworker tujoworker commented Oct 22, 2024

validationRule

// From
new FormError('Invalid value', {
  validationRule: 'pattern',
})

// To
new FormError('Field.errorPattern')

errorMessages

// From
const errorMessages = {
  pattern: 'Show this when "pattern" fails!',
}

// To
const errorMessages = {
  'Field.errorPattern': 'Show this when "pattern" fails!',
}

…errorPattern` etc.) in favor of Eufemia translation keys

This also means `validationRule` used in `FormError` is deprecated in favor of Eufemia translation keys.
@tujoworker tujoworker requested a review from langz October 22, 2024 12:07
Copy link

vercel bot commented Oct 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 0:07am

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant