cancel
Showing results for 
Search instead for 
Did you mean: 

Input field Lenght restriction

Former Member
0 Kudos

Hi,

I have a so many input fields in the View. All fields is binded with the some attributes which has the type as String. So we can store more characters.

Now the problem is: I want to restrict the user to allow only 10 chars for some of the fields even it is binded with the String data element. Is this possible and If possible how to achive this?

Currently i am testing with length & width porperty of input fields, but both are not working.

Warm Regards,

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think the only way to achieve this would be to check the length of the data entered and throw an attribute exception with an error message. Trying to set the length will only set the display length and not the string length of the data in the field.

Regards,

Nithya

Answers (2)

Answers (2)

Former Member
0 Kudos

I didn't find the any solution. I just changed the dataelement dynamically in some way and solved my problem.

Thanks for your help and response.

Warm Regards,

Vijay

Former Member
0 Kudos

Hi Vijay,

As of now, WDP runtime does not do any such restriction check. You will have to manually do the check in your code and throw an error. This check can either be done in the ON_ENTER event handler, or any other event handler method invoked on click of a button.

Regards,

Wenonah