this is my html template code:

```
<input type="text" maxlength="5" 
    [(ngModel)]="groupInfo.discount" (keyup)="validateFloat($event)">

```

there is my validateFloat method:

```
validateFloat(event){
   event.target.value = event.target.value.replace(/[^\d.]/g, "");
   console.log(this.groupInfo.discount);
}

```

then when input value:

```
12adc

```

input element output value:

```
 12

```

but the groupInfo.discount value is:

```
 12a

```

i can't understand why the groupInfo.discount value is `12a`?

And how can i make the groupInfo.discount value is equal to input element's value?

my package dependencies:

```
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "2.0.0-rc.6",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "3.0.0-rc.2",

```