Skip to Content
0

SAP UI5 Table Input Field Validation

Mar 22, 2017 at 10:22 AM

119

avatar image

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,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Mahesh kumar palavalli Mar 22, 2017 at 10:47 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Jun Wu Mar 22, 2017 at 03:20 PM
0

I think you have to handle it.

you can handle it in keydown or keyup event

Share
10 |10000 characters needed characters left characters exceeded