cancel
Showing results for 
Search instead for 
Did you mean: 

Input Field Validation

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

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

nikhil_bose
Active Contributor
0 Kudos

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