cancel
Showing results for 
Search instead for 
Did you mean: 

How to validate the input field

Former Member
0 Kudos

Hi,

I have a input form which is draged from input port of a RFC.

in this input form i have two input fields nad submit button.

on of this input field should always take the character values only. it should not take any numeric value

and other input field should always take numeric value only.

i.e how to validate this two input fields.

regards

srinivas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows

http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm

There are two ways to achieve ur task.

1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following

http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA

http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW

2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this

http://aspzone.com/blogs/john/articles/173.aspx

Everything has been given for validating in javascript.i hope u also validating in javascript only.

For more details on "Regular expressions" search google.

Regards,

Tamil K

Former Member
0 Kudos

how you do taht in VC

can u explain step by step process

rgds

srinivas

Former Member
0 Kudos

Hi,

please refer the following thread which serves ur need.

(Refer reply from Luis)

Regards,

Tamil K

Message was edited by:

Tamil Venthan

Former Member
0 Kudos

Hi Tamil,

My query was not solved in the thread. So please do not post any thread which does not solve the issue.

I am still unable to figure out the solution.

Can you post some relevant answer or provide any How to or tutorial.

Regards

Nikhil

Former Member
0 Kudos

hi,

but this thread doesnt solve my issue

please provide some doc or some step by step procedure

rgds

srinivas

former_member4251
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi All,

The issue with the step by step is that you at the end will need to adapt the formula to validate your own fields.. that's why an example is hard to use.

As mentioned before (in the other thread) you have to create a formula to be used in the validation rule.

For example i want to create a validation rule for input field type number i want it smaller than 8 so i set in the validation rule:

<b>Condition :</b> is Smaller <b>Value :</b> INT(8) <b>Error Message:</b> No Way !

But for text, time, scientific, operators, etc you can create a formula that concrete the validation you want to do...

Is a matter of play with the formulas and test it several times, is not easy and maybe require few time but you asked for a rule.....

As alternative you always have the radiobuttons and the drop-down list..

HTH,

Regards

Luis

Former Member
0 Kudos

Hi,

It is disgusting. The sort of replies I am getting on this forum. The answers are too vague.

For this simple question, can't there be any How to Guide or relevant answer.

Nikhil

former_member4251
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Nikhil,

The Visual Composer is a composition tool, you can do the same in very different ways, this is not a fix tool with only one way to do it...

I'm sad you think that this forum do not help you, but maybe with playing a bit with the storyboard you will get the answer that you're looking for.

Also in you case you give us very small details, you asked how to validate an input and we answered you...(with drop-down list or by using validation rules)

Maybe you're asking for a formula but what kind of formula you want ? which datasources you want to use ? what kind of result are you expecting...

So, again, i think we give you the tricks, now you have to adapt it to use in the right way...

Kind Regards,

Luis

Former Member
0 Kudos

Hi Luis,

My question was very simple.

I just want to check if the input field contains the characters 'a-z' or 'A-Z'. If any character is present then say onBlur or onSubmit there should be an error message.

Can you give me a formula for this requirements. Shall be glad if I get.

Regards

Nikhil

former_member4251
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Nikhil,

I'm still wondering why do you want the formula instead of playing with the tool and find it by your own.. this is the best way to learn.

Nevertheless as this is the second time for a similar question i guess is time to create a blog or a wiki entry with an example.

Hope you can wait till i finish it.

Best Regards,

Luis