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

chore: Form联合校验规则过滤不合法规则 #8747

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

lurunze1226
Copy link
Collaborator

@lurunze1226 lurunze1226 commented Nov 15, 2023

What

🤖 Generated by Copilot at 5a25208

Refactor form validation logic and add translation support for error messages. Use getNormalizedRules to handle rules prop in Form.tsx and filterProps to show rules as JSON string in FormPlugin.tsx. Add default messages for rules in de-DE.ts, en-US.ts, and zh-CN.ts.

🤖 Generated by Copilot at 5a25208

To edit the form rules with ease
We filter the props with filterProps
And convert them to JSON strings
With the help of JSONPipeOut things
Then we validate them with getNormalizedRules

Why

How

🤖 Generated by Copilot at 5a25208

  • Add getNormalizedRules method to Form renderer to validate and translate the rules prop (link)
  • Replace rules prop with getNormalizedRules method call in Form renderer (link,link)
  • Add filterProps method to FormPlugin to convert rules prop to JSON string in form editor (link)
  • Add translations for default message of form rules in de-DE.ts, en-US.ts, and zh-CN.ts locale files (link,link,link)

Copy link

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the chore label Nov 15, 2023
@hsm-lv hsm-lv merged commit 3664f97 into baidu:master Nov 17, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants