Set Minimum Characters on text box

P

PumaMan

Hello,

I have a textbox field with a Maximum # of characters set to 16, but I also
need to set the MINIMUM # to 16 so the user enters no more, and no less.

How can I accomplish this?

Thanks!
 
S

Shiva (GGK Tech)

Hello,

You have to add the validation to find out the length of the string.

Validation: string-length(.) != 16
 
P

PumaMan

I assume this is through VB or JS? When I access the field's data
validation, it does not allow me to enter a function manually. only
OnValidation, AfterChange etc.

I have IP 2003 if that matters. I appreciate the help Shiva.

Shukriya.
 
S

Shiva (GGK Tech)

Hello,

This fix is not related to code. No need to write any code for this. You
have to add the validation in the form. Follow these steps,

1. Double click on the field to properties window
2. Click on ‘Data Validation’ button.
3. Click on ‘Add’ button
4. Select ‘The expression..’ in left side dropdown and copy the above
validation in next text box.
5. Give the validation message in ‘Screen Tip’ text box.
6. Click on ‘OK’ button three times.
 
P

PumaMan

Hi Shiva,

Thank you so much! I was adding it as a function in this format:
string-length(CheckCard_Number) = 16, but that was giving a boolean response.
This will solve my problem as well, but I'll try the manner you provided
below as well.

I appreciate the help, you are zabardast!

Regards,

Elbio
 
Top