Hi,
I have one textbox in that I am going to allow only numbers and i don't want to repeat same numbers consecutively and length should be only 4 numbers
ex:
1233 - invalid
1355 - invalid
13579 - invalid
135 - invalid
1357 - valid
Could you please help me?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', [])
app.controller('MyController', function ($scope, $http, $window) {
$scope.Save = function () {
}
});
</script>
</head>
<body ng-app="MyApp" ng-controller="MyController">
<input type="text" ng-model="Number" />
<input type="button" ng-click="Save()" value="Save" />
</body>
</html>