VMware Cloud Community
VirExprt
Expert
Expert
Jump to solution

Custom Property textBox with Value Validator

Hello,

I wanted to create a custom Property with Type as Text Box where i wanted to give user a freedom to type any number or character but before submission of form , those values should be validated agains correct set of values. Reason i wanted to do this, coz there is large number of Data which can be presented as DropDown or other mean.

I am not sure if this is possible but read somewhere in vCAC 6.1 Documentation that Data validation is possible.

Please guide me a possible solution for the same.

Thanks in advance,

Br,

MG

Regards, MG
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
VirExprt
Expert
Expert
Jump to solution

Hey i got this working with RegEx itself, problem in my case is i can not limit the possibilities based upon department names or vice Versa.

so what i did is in place of using 'DropDownList' i changed it to 'DropDown' which enable users to type numbers and narrow list matching redefied values as they keep typing and to validate right value  input i created RegEx with absolute Value of those numbers.with Expression " / |1234|5678|.........|0987| /g " (without Qoutes)

this worked with me like a charm.

Thanks again Smiley Happy

Br,

MG

Regards, MG

View solution in original post

0 Kudos
5 Replies
VirExprt
Expert
Expert
Jump to solution

I read, Regex( Regular Expression) does the work, but i am not sure how to do that. can i use multiple Regex attributed for absolute value to validate? do i have to write code for that?

BR,

MG

Regards, MG
0 Kudos
GMCON
Enthusiast
Enthusiast
Jump to solution

It depends on what you actually want to do , if you use the RegEx box and you entered something like this ([a-z,A-Z,0-9]{1,5}) then that would allow a user to put in a-z in upper and lower case and numbers 0-9 and allow the combination to go anywhere from 1-5 total numbers or letters or combination thereof.  Does that answer your question?

0 Kudos
VirExprt
Expert
Expert
Jump to solution

actually my requirement is that i have specific set of four digit alphanumeric terms which we offer them to choose by DorpDownList but due to long list of these numbers, customer require to put TextBox where they can write number but these numbers should be validated before form is submitted.

I can see RegEx can go validation but can it do Absolute validation? if not what could be the feasible possible solution?

Br,

MG

Regards, MG
0 Kudos
ArrayaBrill
Contributor
Contributor
Jump to solution

I ran into a similar situation.  RegEx would not provide validation as I needed.  I ended up putting another drop down box that was a parent to the selection and used a relationship to the second drop down box.  This in turn limited the amount of choices.

This would only work if you were able to categorize the list.

so for instance the first drop down would be a dept...then the second would be all the GL entries that fall under that dept.  Instead of showing all GLs for all departments.  Not sure if something like that would work in your situation but it is a thought.

0 Kudos
VirExprt
Expert
Expert
Jump to solution

Hey i got this working with RegEx itself, problem in my case is i can not limit the possibilities based upon department names or vice Versa.

so what i did is in place of using 'DropDownList' i changed it to 'DropDown' which enable users to type numbers and narrow list matching redefied values as they keep typing and to validate right value  input i created RegEx with absolute Value of those numbers.with Expression " / |1234|5678|.........|0987| /g " (without Qoutes)

this worked with me like a charm.

Thanks again Smiley Happy

Br,

MG

Regards, MG
0 Kudos