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

fix(components): [form] improve types #14062

Merged
merged 4 commits into from
Aug 30, 2023
Merged

fix(components): [form] improve types #14062

merged 4 commits into from
Aug 30, 2023

Conversation

ModyQyW
Copy link
Contributor

@ModyQyW ModyQyW commented Aug 23, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

In #12549 we introduced an optional generic support. However, it doesn't consider Date, File, .etc. This PR fixes the problem and updates the doc.

🤖 Generated by Copilot at f25fed6

Improved the type definitions and documentation for form validation rules. Added support for native objects and nested fields using Path and FieldPath types in packages/components/form/src/types.ts and docs/en-US/component/form.md.

Related Issue

/

Explanation of Changes

This PR considers Date, File, FileList, and Blob. Should be an improve.

🤖 Generated by Copilot at f25fed6

  • Update FormRules type to support nested fields and tuples (link, link, link, link)

@pull-request-triage
Copy link

👋 @ModyQyW, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

Hello @ModyQyW, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Aug 23, 2023
@github-actions
Copy link

github-actions bot commented Aug 23, 2023

🧪 Playground Preview: https://element-plus.run/?pr=14062
Please comment the example via this playground if needed.

@btea btea enabled auto-merge (squash) August 30, 2023 13:24
@btea btea merged commit 3c1bd4e into element-plus:dev Aug 30, 2023
10 checks passed
@element-bot element-bot mentioned this pull request Sep 14, 2023
3 tasks
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
* fix(components): [form] improve types

* docs: update form

* fix: consider RegExp

* chore: update jsdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants