cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
932
Views
0
Helpful
4
Replies

How to validate settings in vfc

sreekanth47
Level 4
Level 4

Hi All,

          I want to validate a setting of type string.How can I achieve this. The below is my setting array.

settingArray[0] =

  new Setting( MENU_ID,

   MENU_ID,

  MENU_ID,

  Setting.REQUIRED,

  Setting.SINGLE,

  Setting.SUBSTITUTION_ALLOWED,

  Setting.STRING);

Here is the setting name is Menu_id which of type string, I want to validate the length of this setting, if I enter menu id as 12345, it should allow only first 3 digits. Is this possible in vfc. Thanks in advance

4 Replies 4

ewindgat
Level 5
Level 5

Are you receiving an error?

No I didn't get any errors, but this setting allow me to enter any length of digit,but it should accept only 3 number digit only.

goujain
Cisco Employee
Cisco Employee

There are Setting Constructor for integer range, but String length range Setting Constructor is currently not available.

Thanks Gourav, I'll look into that constructior

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: