Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docu for @Common.FieldControl validation #1474

Merged
merged 13 commits into from
Dec 6, 2024
2 changes: 1 addition & 1 deletion cds/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ Intrinsically supported OData Annotations:
| `@Core.IsMediaType` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Core.IsUrl` | see [Media Data](../guides/providing-services#serving-media-data) |
| `@Capabilities...` | see [Fiori](../advanced/fiori) |
| `@Common.FieldControl` | see [Input Validation](../guides/providing-services#input-validation)) |
| `@Common.FieldControl` | see [Input Validation](../guides/providing-services#common-fieldControl) |
9 changes: 9 additions & 0 deletions guides/providing-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,15 @@ In addition to server-side input validation as introduced above, this adds a cor



### `@Common.FieldControl` {#common-fieldControl}
chgeo marked this conversation as resolved.
Show resolved Hide resolved

The input validation for `@Common.FieldControl: #Mandatory` and `@Common.FieldControl: #ReadOnly` is done from the CAP runtimes automatically.
renejeglinsky marked this conversation as resolved.
Show resolved Hide resolved
::: warning
You need to implement custom input validation for `@Common.FieldControl` when using static or dynamic numeric values, for example, `@Common.FieldControl: 1` or `@Common.FieldControl: integer_field`.
mariayord marked this conversation as resolved.
Show resolved Hide resolved
:::



### `@assert .unique`

Annotate an entity with `@assert.unique.<constraintName>`, specifying one or more element combinations to enforce uniqueness checks on all CREATE and UPDATE operations. For example:
Expand Down
Loading