You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can listen to other fields on change, for example:
validators={{onChangeListenTo: ['people'],onChange: ({ value, fieldApi })=>{if(!value){returnundefined;}constvalueExists=fieldApi.form.getFieldValue('people').some(({ name })=>name===value);if(valueExists){return'Name must be unique';}returnundefined;},}}
I have two fields that are arrays of user objects. How can i validate that user.name are unique across both arrays?
The text was updated successfully, but these errors were encountered: