score:6
you need to use deep object to display error for nested fields. like this:
const errorobj = {
myfieldarray: {
[index]: {
sometext: 'field required!'
}
}
};
throw new submissionerror(errorobj);
Source: stackoverflow.com
Related Query
- Does SubmissionError works with FieldArray fields?
- Request made with axios does not work but if it works with XMLHttpRequest
- How does Array.map() works with react components?
- Why does destructoring works with events, and wont work without it
- How to validate dyanmic fields of fieldArray in Formik with Yup onSubmit
- Codesandbox "Preview on edit" does not work for Aurelia but works with other frameworks and vanilla HTML
- props.match.params.id works when I am testing but does not when I deploy in github with gh-pages
- Starting a php session from react with an axios call does not keep the session alive, but doing it with postman works just fine
- Why does React protected route works for the 2nd time with Recoil state
- Does React.lazy() works with Create React App?
- How to display fields from FieldArray in a different component (one component up) with redux-form
- Why does Javascript .filter() not return anything with an active filter (== or ===) but works fine if the boolean logic is of type != or !==?
- React+Laravel: Nivo Slider does not works properly with React Router based navigation
- does clearTimeout works with let and const?
- Test with userEvent.keyboard() does not pass, however it works in the browser
- React Component CSS does not work when digit zero "0" is displayed but works fine with other values
- Why does my request fail when I pass an it an object with multiple variables but works but works if I pass it the individual variable?
- Axios get in url works but with second parameter as object it doesn't
- ReactJS SyntheticEvent stopPropagation() only works with React events?
- Error with Redux DevTools Extension using TS: "Property '__REDUX_DEVTOOLS_EXTENSION_COMPOSE__' does not exist on type 'Window'."?
- Property does not exist on type 'DetailedHTMLProps, HTMLDivElement>' with React 16
- Which Enzyme adapter works with React 17?
- Does react.js play nice with jQuery/UI components
- What is AMP HTML and how does it fit in with framework/tool X?
- Using styled components with Typescript, prop does not exist?
- Why does Async Await work with React setState?
- What does this warning message mean? 'img elements must have an alt prop, either with meaningful text, or an empty string for decorative images'
- How Snapshot testing works and what does toMatchSnapshot( ) function do in Jest Snapshot testing for React components?
- How does one debug NextJS React apps with WebStorm?
- Why does react make input[type="text"] fields readonly unless I supply onChange callback?
More Query from same tag
- Semantic UI React Transition not animating
- Call a JSONP API with React
- TypeError: Cannot read property 'map' of undefined When trying to map multiple arrays
- facing fs-extra, html-webpack-plugin-before-html-processing, graceful-js issues when starting react app
- How to avoid extra renders in my component to use react hooks
- How to avoid the error "Unknown prop <> on tag. Remove this prop from the element"?
- Reactjs Module CSS multiple class selector
- Why is string returned from promise undefined?
- React router changes url but not view
- Mount/Render a React component manually using JS
- When and where should components get their data from the server?
- Where is data stored in react?
- How do I setup environment variables for multiple environments?
- Reselect - how to figure out which argument changed?
- How to upload an image to AWS S3 using GraphQL?
- Calling an async function in another file and using .then there
- Re-adding styles to React component
- Warning: Prop `id` did not match in tradingview widget
- Mobile menu cloe after transition end
- Webpack/react hot reload reloading whole page?
- Browser shows redirected url but component not rendered - Redux Saga
- Get the deepest comment of every parent comment in ReactJS
- React Redux: Reload the component from ACTION when the props change
- Nice way in React to Map an array data to Card Decks
- How can I delete a product from the cart?
- ReactJS - how to create a dynamic ref from the parent. The child is a functional component
- Validation using Yup with key
- How do I access a table <td> via refs instead of id in React.js
- style-loader not working for Webpack2
- How to set "interval id" to state in React