All docs
V21.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
22.1
21.2
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.
A newer version of this page is available. Switch to the current version.

jQuery TextArea - Limit the Text Length

To limit the text length, assign an integer number to the maxLength property. 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
     ],
     // ...
 })
Vue
<template>
    <DxTextArea :max-length="200"/>
</template>

<script>
import 'devextreme/dist/css/dx.light.css';

import { DxTextArea } from 'devextreme-vue/text-area';

export default {
    components: {
        DxTextArea
    }
}
</script>
React
import React from 'react';
import 'devextreme/dist/css/dx.light.css';

import { TextArea } from 'devextreme-react/text-area';

class App extends React.Component {
    render() {
        return (
            <TextArea maxLength={200}/>
        );
    }
}

export default App;
See Also