cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict the length of input field

Former Member
0 Kudos

Hi,

How to restrict the length of input field. That is we should not be able to enter more thatn 10 charecters.

Regards,

H.V.Swathi

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi Swathi,

try this, u can create a simple type and here u can set the maximun and minimun length for the simple type .

set the simple type to the attribute which is bound to input field.

Thanks and Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi swathi,

For this you have to create a simple data type. No need of writing a code.

Go to Dictionaries -> Local Dictionary -> Data Type - > Simple Type - > Right click and "Create Simple Type".

Here you should create a Simple type with String as built-in Type. Here you will also see the Length Constraints option.

Set the value of maximum length and minimum length. In your case set the value of maximum length to 10. At runtime this will not allow the user to enter more than 10 characters.

Now create an attribute and bind it to this newly created simple type. Bind the value of the input field with this particular attribute.

Regards

Manohar