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: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,6 +66,7 @@ A [live playground](https://mozilla-services.github.io/react-jsonschema-form/) i
66
66
-[Form data validation](#form-data-validation)
67
67
-[Live validation](#live-validation)
68
68
-[Custom validation](#custom-validation)
69
+
-[Custom error messages](#custom-error-messages)
69
70
-[Error List Display](#error-list-display)
70
71
-[Styling your forms](#styling-your-forms)
71
72
-[Schema definitions and references](#schema-definitions-and-references)
@@ -1170,6 +1171,36 @@ render((
1170
1171
> received as second argument.
1171
1172
> - The `validate()` function is called **after** the JSON schema validation.
1172
1173
1174
+
### Custom error messages
1175
+
1176
+
Validation error messages are provided by the JSON Schema validation by default. If you need to change these messages or make any other modifications to the errors from the JSON Schema validation, you can define a transform function that receives the list of JSON Schema errors and returns a new list.
> - The `transformErrors()` function must return the list of errors. Modifying the list in place without returning it will result in an error.
1203
+
1173
1204
### Error List Display
1174
1205
1175
1206
To disable rendering of the error list at the top of the form, you can set the `showErrorList` prop to `false`. Doing so will still validate the form, but only the inline display will show.
0 commit comments