X Tutup
Skip to content

Commit d1c4766

Browse files
mkolodnyIgorMinar
authored andcommitted
docs(guide/forms): update example
Right now, non-integers such as 'aawefwae' are valid. This ensures that only integers are valid. Hopefully that makes the example more powerful. Closes angular#5501
1 parent 9847383 commit d1c4766

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/guide/forms.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ In the following example we create two directives.
235235
<script>
236236
var app = angular.module('form-example1', []);
237237

238-
var INTEGER_REGEXP = /^\-?\d*$/;
238+
var INTEGER_REGEXP = /^\-?\d+$/;
239239
app.directive('integer', function() {
240240
return {
241241
require: 'ngModel',

0 commit comments

Comments
 (0)
X Tutup