Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: How can I Validate the Input fields in the UI of SAP Fiori App?

$
0
0

Hello Lakshmi,

 

you can you attachBrowserEvent for vaidation of the input fields,

Like,

 

in view,

 

var oTextField = new sap.m.Input({
});
oTextField.attachBrowserEvent("keypress",oController.acceptOnlyNumerics);

in Controller,

 

acceptOnlyNumerics:function(event){  var key_codes = [48,49,50,51,52,53,54,55,56,57];   if (!($.inArray(event.which, key_codes) >= 0)) {      event.preventDefault();    }      },

Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>