mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
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 #5501
This commit is contained in:
parent
98473835a2
commit
d1c4766d14
1 changed files with 1 additions and 1 deletions
|
|
@ -235,7 +235,7 @@ In the following example we create two directives.
|
|||
<script>
|
||||
var app = angular.module('form-example1', []);
|
||||
|
||||
var INTEGER_REGEXP = /^\-?\d*$/;
|
||||
var INTEGER_REGEXP = /^\-?\d+$/;
|
||||
app.directive('integer', function() {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
|
|
|
|||
Loading…
Reference in a new issue