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: Form validateMessages support ${label} #21835

merged 3 commits into from Mar 3, 2020

feat: Form validateMessages support ${label} #21835

merged 3 commits into from Mar 3, 2020


Copy link

@zombieJ zombieJ commented Mar 3, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

const validateMessages = {
  required: '${label} is required!',

<Form validateMessages={validateMessages}>
      <Form.Item name="user" label="Name" rules={[{ required: true }]}>
        <Input />

📝 Changelog

Language Changelog
🇺🇸 English Form validateMessages support ${label} variable.
🇨🇳 Chinese Form validateMessages 支持 ${label} 变量。

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/form/demo/

Copy link

@tests-checker tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

Copy link

@ant-design-bot ant-design-bot commented Mar 3, 2020

@zombieJ zombieJ merged commit 661ff79 into feature Mar 3, 2020
26 of 28 checks passed
@zombieJ zombieJ deleted the form-label branch Mar 3, 2020
Copy link

@codesandbox-ci codesandbox-ci bot commented Mar 3, 2020

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.

Latest deployment of this branch, based on commit 6a1b0ce:

Sandbox Source
antd reproduction template Configuration

Copy link

@codecov codecov bot commented Mar 3, 2020

Codecov Report

Merging #21835 into feature will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #21835      +/-   ##
+ Coverage    97.89%   97.89%   +<.01%     
  Files          305      305              
  Lines         7026     7029       +3     
  Branches      1943     1933      -10     
+ Hits          6878     6881       +3     
  Misses         148      148
Impacted Files Coverage Δ
components/form/FormItem.tsx 99.04% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d63040...6a1b0ce. Read the comment docs.

Copy link

@afc163 afc163 commented Mar 20, 2020

changelog 写的时候要带上 react-component/field-form#102

Copy link

@k55k32 k55k32 commented Mar 26, 2020

good job

@zombieJ zombieJ mentioned this pull request Mar 29, 2020
10 tasks
Copy link

@crazyair crazyair commented Mar 30, 2020

@zombieJ 最终还是做了啊。。。可是我这用了其它方式代替了

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

Successfully merging this pull request may close these issues.

None yet

6 participants