Skip to Content
avatar image
Former Member

Input Field Validation

Hi SDN,

I am creating an application in web dynpro. I have couple of input fields of string datatype and i want to restrict the entry on min and max characters. The user cannot enter the input field more than the no of characters i mention for the input field. How shall I manipulate this without writing the logic in submit button. I know there is simple data types in web dynpro. But I havent used it.

Kindly help me out...

Thanks & Regards,

Ganesh N

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 03, 2008 at 11:21 AM

    Hi ,

    Create a Simple type of type String .

    In the Defination Tab of the Simple type , set the Minimun and Maximun Length for the field.

    Now create a Context Attribute Say Test and for type , browse and select the simple type which u have created .

    Thanks and Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 03, 2008 at 10:39 AM

    sol1: by design:

    create a simple type of basic type string and you can mention min. max lengths there.

    sol2: by code:

    access modifiable simple type of that attribute, set min, max length fields.

    nikhil

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 04:28 AM

    hi,

    to define a simple type with min and max length,follow the below process.

    create a simple type and by default you see the definition tab of that simple type

    in General Information

    Built-In Type="String",

    and in

    Length Contraints

    maximum length:10

    Minimum length:5

    and assign this to context attribute.

    Regards,

    ramesh

    Add comment
    10|10000 characters needed characters exceeded