Angular TextBox - Limit the String Length

To limit the string length, assign an integer number to the maxLength property. By default, the string length is unlimited.

HTML
TypeScript
  • <dx-text-box
  • [maxLength]="10">
  • </dx-text-box>
  • import { DxTextBoxModule } from "devextreme-angular";
  • // ...
  • export class AppComponent {
  • // ...
  • }
  • @NgModule({
  • imports: [
  • // ...
  • DxTextBoxModule
  • ],
  • // ...
  • })
See Also