Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if else condition in angular if user enter string value in input integer

var numbers =/^[0-9]+$/;
 var code = $scope.Nuser.centerCode;
 alert(code);
 if(code.val(numbers))
 {
     alert(code.val(numbers));
 }
 else
 {
     alert("enter numbers only");
 }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #condition #angular #user #enter #string #input #integer
ADD COMMENT
Topic
Name
4+7 =