Skip to Content
avatar image
Former Member

SAP UI5 Table Input Field Validation

Hi,

I am using sap.m.table which is binded to Backend OData Model.One of the columns(Quantity) in the table is editable.Editable field should allow only decimal value ( Characters and special characters ) are not allowed. even though the type is defined as Float, editable field is still allowing characters also. could you please suggest how to activate validation on standard data types.?

Editable field type is defined as below

<Input value="{ path : 'OpenQuantity', type: 'sap.ui.model.type.Float', formatOptions: { minFractionDigits: 2, maxFractionDigits: 2 }, constraints: {maximum :10} }" />

And below value is added under sap.ui5 of manifest.json

"handleValidation": true,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 22, 2017 at 10:47 AM

    I understand that you have mentioned the handle validation in manifest but can you also try calling this code in view controller onInit method and in the format options, give this one maxIntegerDigits:10

    sap.ui.getCore().getMessageManager().registerObject(this.getView(),true);

    Best Regards,

    Mahesh

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 22, 2017 at 03:20 PM

    I think you have to handle it.

    you can handle it in keydown or keyup event

    Add comment
    10|10000 characters needed characters exceeded