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: admin/validation.md
+3-4
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ API Platform Admin manages automatically two types of validation: client-side va
5
5
## Client-side Validation
6
6
7
7
If the API documentation indicates that a field is mandatory,
8
-
API Platform Admin will automatically add a [required client-side validation](https://marmelab.com/react-admin/CreateEdit.html#per-input-validation-built-in-field-validators).
8
+
API Platform Admin will automatically add a [required client-side validation](https://marmelab.com/react-admin/Validation.html#per-input-validation-built-in-field-validators).
9
9
10
10
For instance, with API Platform as backend, if you write the following:
11
11
@@ -25,7 +25,7 @@ class Book
25
25
}
26
26
```
27
27
28
-
If you create a new book and touch the "Title" field without typing, you will see:
28
+
If you create a new book and try to submit without filling the "Title" field, you will see:
29
29
30
30

31
31
@@ -34,8 +34,7 @@ If you create a new book and touch the "Title" field without typing, you will se
34
34
When the form is submitted and if submission errors are received,
35
35
API Platform Admin will automatically show the errors for the corresponding fields.
36
36
37
-
To do so, it uses the [submission validation](https://marmelab.com/react-admin/CreateEdit.html#submission-validation) feature of React Admin,
38
-
and the mapping between the response and the fields is done by the [schema analyzer](components.md#schemaanalyzer) with its method `getSubmissionErrors`.
37
+
To do so, it uses the [Server-Side Validation](https://marmelab.com/react-admin/Validation.html#server-side-validation) feature of React Admin, and the mapping between the response and the fields is done by the [schema analyzer](components.md#hydra-schema-analyzer) with its method `getSubmissionErrors`.
39
38
40
39
API Platform is supported by default, but if you use another backend, you will need to override the `getSubmissionErrors` method.
0 commit comments