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.

  • <template>
  • <DxTextBox :max-length="10"/>
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import { DxTextBox } from 'devextreme-vue/text-box';
  •  
  • export default {
  • components: {
  • DxTextBox
  • }
  • }
  • </script>
See Also