yuyang041060120 / ng2-validation

angular2 validation
https://yuyang041060120.github.io/ng2-validation/index.html
MIT License
612 stars 213 forks source link

maxlength #118

Open daliri72 opened 6 years ago

daliri72 commented 6 years ago

Hello I using maxlengthattribute in input. but it doesn't work. How can i solved it ?

 <input required name="phone" 
                maxlength="10"
                [(ngModel)]="modelForget.phone" #phone="ngModel" style="direction: ltr;" autocomplete="off" class="form-control bg-gray"
                  value="" placeholder="phone number" type="number">
import { CustomFormsModule } from 'ng2-validation';
@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    CustomFormsModule
  ],
  providers: [
    ChangeTemplateService
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }