# Form designer: Maxlength for a multiline textbox

**URL:** <https://discuss.workflowgen.com/t/form-designer-maxlength-for-a-multiline-textbox/240>\
**Category:** Form Designer\
**Created:** [July 20, 2013, 3:33am UTC](https://discuss.workflowgen.com/t/form-designer-maxlength-for-a-multiline-textbox/240 "2013-07-20T03:33:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [July 20, 2013, 3:33am UTC](https://discuss.workflowgen.com/t/form-designer-maxlength-for-a-multiline-textbox/240/1 "2013-07-20T03:33:52Z")

</div>

It is not possible to define a maxlength for a multiline textbox in the form field setting parameters, but you can add a simple client-side JavaScript or a simple .NET custom validation code to check the length of the text value.

### Examples

#### Javascript

Add a custom attribute in the field Settings / HTML attributes / `onkeypress`:

```auto
if (this.value.length > 5) { alert('maxlength is 5'); return false }  

```

#### .NET

Add this .NET code to the custom validation tab in the `REQUEST_DESCRIPTION` field’s settings:

```auto
REQUEST_DESCRIPTION.Text.Length <1

```
