Skip to Content
avatar image
Former Member

How to restrict the length of input field

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 28, 2009 at 06:28 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 28, 2009 at 06:32 AM

    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

    Add comment
    10|10000 characters needed characters exceeded