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
Copy file name to clipboardExpand all lines: docs/guide/configuration.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,19 @@ forcing a full page visit instead of an XHR visit on the next request.
130
130
131
131
See [assets versioning](/guide/asset-versioning).
132
132
133
+
### `always_include_errors_hash`
134
+
135
+
**Default**: `nil`
136
+
**ENV**: `INERTIA_ALWAYS_INCLUDE_ERRORS_HASH`
137
+
138
+
@available_since rails=master
139
+
140
+
Whether to include an empty `errors` hash in the props when no validation errors are present.
141
+
142
+
When set to `true`, an empty `errors: {}` object will always be included in Inertia responses. When set to `false`, the `errors` key will be omitted when there are no errors. The default value `nil` currently behaves like `false` but shows a deprecation warning.
143
+
144
+
The default value will be changed to `true` in the next major version.
Some events, such as `before`, `invalid`, and `error`, support cancellation, allowing you to prevent Inertia's default behavior. Just like native events, the event will be cancelled if only one event listener calls `event.preventDefault()`.
231
+
Some events, such as `before`, `exception`, and `invalid`, support cancellation, allowing you to prevent Inertia's default behavior. Just like native events, the event will be cancelled if only one event listener calls `event.preventDefault()`.
0 commit comments