From 446682b78c55f428506b62729638b3e2463a7155 Mon Sep 17 00:00:00 2001 From: Mariya Yordanova Date: Wed, 27 Nov 2024 17:27:31 +0100 Subject: [PATCH 1/2] Added docu for @Common.FieldControl validation --- cds/annotations.md | 2 +- guides/providing-services.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cds/annotations.md b/cds/annotations.md index 68a35a0f8..bc8ea8e59 100644 --- a/cds/annotations.md +++ b/cds/annotations.md @@ -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) | diff --git a/guides/providing-services.md b/guides/providing-services.md index 6177e51cf..3b7bd4dee 100644 --- a/guides/providing-services.md +++ b/guides/providing-services.md @@ -926,6 +926,12 @@ entity Foo { ``` +### `@Common.FieldControl` {#common-fieldControl} + +The input validation for `@Common.FieldControl: #Mandatory` and `@Common.FieldControl: #ReadOnly` is done from the CAP runtimes automatically. +The input validation for `@Common.FieldControl` with static or dynamic numeric values(e.g. `@Common.FieldControl: 1` or `@Common.FieldControl: integer_field` ) has to be done by custom implementation. + + ## Custom Logic From b883215440fda192325d6e26d3f21c68630041b3 Mon Sep 17 00:00:00 2001 From: mariayord Date: Thu, 28 Nov 2024 08:58:53 +0100 Subject: [PATCH 2/2] Update guides/providing-services.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- guides/providing-services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/providing-services.md b/guides/providing-services.md index 3b7bd4dee..d18682610 100644 --- a/guides/providing-services.md +++ b/guides/providing-services.md @@ -929,7 +929,7 @@ entity Foo { ### `@Common.FieldControl` {#common-fieldControl} The input validation for `@Common.FieldControl: #Mandatory` and `@Common.FieldControl: #ReadOnly` is done from the CAP runtimes automatically. -The input validation for `@Common.FieldControl` with static or dynamic numeric values(e.g. `@Common.FieldControl: 1` or `@Common.FieldControl: integer_field` ) has to be done by custom implementation. +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`.