score:0

Accepted answer

you can add a validator directly to the field (in its validate property) and this will be applied to the specific field element in the array. for example with a validator called 'required' as in this example

const required = value => (value ? undefined : "required"); 

then the field will look like this with the ability to access the metadata with any validation errors

<field 
     name={`${name}.firstname`}
     validate={ required }
     render={({ input, meta }) => (
       <div>
         <input {...input} />
         {meta.touched && meta.error && <span>{meta.error}</span>}
       </div>
     )} 
/>

working example :

https://codesandbox.io/s/y3w6yo8xr9

score:1

you can add validation before submit and after submit like this https://codesandbox.io/s/8xkn4r10m8


Related Query

More Query from same tag