Validating length of textbox in datagrid


28-Jul-2020 05:26

The Text Box control has a useful property called Max Length which limits how many characters you can enter in it.

There does not seem to be an obvious/simple way to do the same thing with a Grid View Data Column.

The validatebox is designed to validate the form input fields.

If users enter invalid values, it will change the background color, display the alarm icon and a tooltip message.

This code demonstrates a Validation Text Box that only accepts a 5 digit zip code.

In this demo, editors are collected in an HTML form.You will need to set it to a style targeting Text Box, and having one setter - for the Max Lenght property.Regards, Pavel Pavlov the Telerik team Do you want to have your say when we set our development plans?Possible values are: 1) a valid type string, apply a single validate rule.

2) a valid type array, apply multiple validate rules.

The multiple validate rules on a field are available since version 1.3.2.