Skip to content
Source
Sign inSign up
TanStack/form

Add 'setErrorMap' api to 'formApi' and 'fieldApi' #821

MergedToavina23(GitHub profile, opens in a new tab)merged 3 commits intomain fromrefs/pull/821/headmerged by Balastrong(GitHub profile, opens in a new tab)

This PR adds an ability to set errorMap on a fieldApi on formApi as requested in #786.

work done:

  • adding the setErrorMap to both of fieldApi and formApi
  • write test for
    • checking if the values are added
    • checking if the other values on the errorMap are not overriden by incomming errorMap
    • checking that only the concerned value is overriden when setting erroMap
  • add the necessary documentation on FormApi and FieldApi

Feel free to reach out if any of the implementation made needs to be corrected.

    1. ☁️ Nx Cloud Report

      CI is running/has finished running commands for commit 3a9569b8b03d2708c5d318e280535d4ec8780a46. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

      📂 See all runs for this CI Pipeline Execution


      ✅ Successfully ran 2 targets

    2. Sent with 💌 from NxCloud.

  • Thanks for the PR, it looks really good!

    For the two conflicts could you please just revert the changes? Reference docs will be autogenerated (this is something rather new, we'll probably have to write it down somewhere).

  • Hello @Balastrong , Thanks for your feedback. I think it should be good now.

  • Balastrong(GitHub profile, opens in a new tab) approved these changes

    Looks good now, thanks again!

  • Sign in to join this conversation.