Skip to Content
0
Dec 27, 2022 at 05:37 PM

Constraints in SmartField

84 Views Last edit Dec 27, 2022 at 05:39 PM 2 rev

Why constraints does not work in SmartField object?

oMyInput = new Input({
  value: {
	path: 'myValue',
	type: 'sap.ui.model.type.Float',
	constraints: {
	  maximum: 10,
	  minimum: 0
	},
  },
});

oMyInput2 = new SmartField({
  value: {
	path: 'myValue',
	type: 'sap.ui.model.type.Float',
	constraints: {
	  maximum: 10,
	  minimum: 0
	},
  },
});<br>

It works on oMyInput but not in oMyInput2