# Asset selector component validation

**URL:** <https://community.cumulocity.com/t/asset-selector-component-validation/7438>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [September 20, 2024, 1:54pm UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438 "2024-09-20T13:54:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohan\_Pathapataa](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/mohan_pathapataa/32/11730_2.png) [@Mohan\_Pathapataa](https://community.cumulocity.com/u/Mohan_Pathapataa)\
**Post date:** [September 20, 2024, 1:54pm UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438/1 "2024-09-20T13:54:33Z")

</div>

#### _ **Product/components** used and **version/fix** level:_

1018

#### _Detailed explanation of the problem:_

I am using a asset selector component for asset selection in my plugin. I have criteria to have multi select only a **Devices** not **Groups** and **Sites** for this have adjusted config object as below.

```auto
config = {
  groupsSelectable: false,
  multi: true,
  modelMode: 'full',
  label: `Assets (3 Max)`
};

<c8y-asset-selector formControlName="assetSelect" [(ngModel)]="model"(onSelected)="selectionChanged($event)" [config]="config"></c8y-asset-selector>

```

at the same time I should allow user to select max 3 devices under only one site or group as below.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/b/fb9cf639867430d6fe1d4233196c3aa4d5db6365.png)

Let say I have selected one device from one site and other device from diff site or group is not allowed. I have gone through the documentation [here](https://styleguide.cumulocity.com/apps/codex/#/components/asset-selector/api). Did not find any references. Is that doable ?

#### _Question related to a **free trial** , or to a **production (customer)** instance?_

Production

**Regards**  
**Mohan**

---

<div class="post-metadata">

**Author:** ![Tristan\_Bastian](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/tristan_bastian/32/18259_2.png) [@Tristan\_Bastian](https://community.cumulocity.com/u/Tristan_Bastian)\
**Post date:** [September 21, 2024, 1:49pm UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438/2 "2024-09-21T13:49:01Z")

</div>

Hi @Mohan_Pathapataa,

This would be logic you would have to implement on your own.

Regards,  
Tristan

---

<div class="post-metadata">

**Author:** ![Mohan\_Pathapataa](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/mohan_pathapataa/32/11730_2.png) [@Mohan\_Pathapataa](https://community.cumulocity.com/u/Mohan_Pathapataa)\
**Post date:** [September 22, 2024, 7:39am UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438/3 "2024-09-22T07:39:08Z")

</div>

Thanks for the information, @Tristan_Bastian. I am specifically looking for a custom implementation. Before proceeding, I am checking whether the out-of-the-box Asset Selector has any such support.

For disabling asset-level checkboxes, is there a property available to set, or do we need to disable them via CSS only? Additionally, when selecting an asset from the list, can we retrieve the respective Site and Group it belongs to from the selected items? with out calling REST end point. I am just seeking clarification on these points.

Regards  
Mohan

---

<div class="post-metadata">

**Author:** ![ChloeBell](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@ChloeBell](https://community.cumulocity.com/u/ChloeBell)\
**Post date:** [October 21, 2024, 1:50pm UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438/4 "2024-10-21T13:50:36Z")

</div>

> [@Mohan\_Pathapataa](#):
>
> #### _ **Product/components** used and **version/fix** level:_
> 
> 1018
> 
> #### _Detailed explanation of the problem:_
> 
> I am using a asset selector component for asset selection in my plugin. I have criteria to have multi select only a **Devices** not **Groups** and **Sites** for this have adjusted config object as below.
> 
> ```auto
> config = {
> groupsSelectable: false,
> multi: true,
> modelMode: 'full',
> label: `Assets (3 Max)`
> };
> 
> <c8y-asset-selector formControlName="assetSelect" [(ngModel)]="model"(onSelected)="selectionChanged($event)" [config]="config"></c8y-asset-selector>
> 
> ```
> 
> at the same time I should allow user to select max 3 devices under only one site or group as below.
> 
> ![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/b/fb9cf639867430d6fe1d4233196c3aa4d5db6365.png)
> 
> Let say I have selected one device from one site and other device from diff site or group is not allowed. I have gone through the documentation here . Did not find any references. Is that doable ?
> 
> #### _Question related to a **free trial** , or to a **production (customer)** instance?_
> 
> Production
> 
> **Regards**  
> **Mohan**

All good now?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 19, 2025, 1:51pm UTC](https://community.cumulocity.com/t/asset-selector-component-validation/7438/5 "2025-04-19T13:51:05Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
