Skip to Content
1
Sep 16, 2023 at 07:44 AM

UI5 Constraints not working

128 Views Last edit Sep 16, 2023 at 07:45 AM 4 rev

Hi All

I have below code, where event change "checkDate" is triggering and rule mentioned within constraint is not working i.e. user can not enter decimals. However if I remove the change event from input, constraints working fine.

Requirement is system must verify constraint before going to event change.

<Input id="noofmonth_id" visible="true" required="true" width="50%" value="{path:'NoofMonth', type: 'sap.ui.model.odata.type.Decimal', constraints: { precision: 2, scale:0}}" enabled="true" change="checkDate"  placeholder="Enter no of months between 0 to 12"/>