A newer version of this page is available. Switch to the current version.

Limit the Text Length

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

jQuery
JavaScript
$(function() {
    $("#textAreaContainer").dxTextArea({
        maxLength: 200
    });
});
Angular
HTML
TypeScript
<dx-text-area
    [maxLength]="200">
</dx-text-area>
import { DxTextAreaModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
     imports: [
         // ...
         DxTextAreaModule
     ],
     // ...
 })
See Also