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
To fix the display you just have to extract the error messages correctly and set them in the respective components. How this has to be done can be seen in the above components. It might be helpful to run in an interactive node environment the creation of a record and intentionally cause a validation error to be able to inspect its structure.
For example start node in a sandbox test graphql-server with some playground models. Then var models = require('src/models/index.js'). Then models.book.create( {name: 124} ), ensure that in book there is a string validation. Now you should see a validation error and can inspect its structure.
Based on the above you can write an integration test.
IMPORTANT: Global error
The above components can display global errors, if the validation error is not associated with a certain attribute, or if another unexpected error occurs. To display that, please use the component implemented in this Issue of single page application.
Expected work time: 2d
The text was updated successfully, but these errors were encountered:
The old RESTful application successfully displayed validation error messages.
The related component is
views/pages/formElements.ejs
(lines 12 to 14 and 132 to 137)views/pages/createForm.ejs
lines 42 to 52views/pages/editForm.ejs
lines 61 to 70To fix the display you just have to extract the error messages correctly and set them in the respective components. How this has to be done can be seen in the above components. It might be helpful to run in an interactive node environment the creation of a record and intentionally cause a validation error to be able to inspect its structure.
For example start
node
in a sandbox test graphql-server with some playground models. Thenvar models = require('src/models/index.js')
. Thenmodels.book.create( {name: 124} )
, ensure that in book there is a string validation. Now you should see a validation error and can inspect its structure.Based on the above you can write an integration test.
IMPORTANT: Global error
The above components can display global errors, if the validation error is not associated with a certain attribute, or if another unexpected error occurs. To display that, please use the component implemented in this Issue of
single page application
.Expected work time: 2d
The text was updated successfully, but these errors were encountered: