How we can validate more than one input "at the same time"


Guest

I have a contact form and want to validate 3 inputs controls with one submit buttons. Not the case in the app sample.

How do I implement that? Example with. Name = if alphabet, email = if email and phone = numeric.

I also notice there is no Numeric but alphanumeric. What can won do in this case?

Thanks in anticipation.


DecSoft

Hello Kasito,

App Builder provides several "validator" actions like "IsEmail", "IsAlpha", "IsNumeric", "IsAlphaNum", etc., etc. You can take a look at the "Validator" application sample to view lot of these actions working. If you no need these actions maybe you can use the "IfEx" action to "validate" more than one input at the same time.

However, if you need to use these actions (for your convenience) a probably way to validate more than one input is just to proceed in a sequential way and by using the "If" action or the "IfEx" action at the end.

I also notice there is no Numeric but alphanumeric. What can won do in this case?

I am not sure if understand but we have the "IsAlpha", "IsNumeric" and "IsAlphaNum" actions, which cover the "only alphabetic characters", "only numeric characters" and "only alphabetic and numeric characters" cases.

Anyway, remember that ALWAYS you send user input data from your application to your application's server, that user input data must be validated again, since a client side application can be defeated, for example.



Guest

Thanks David for your concern. I have seen the validation sample in app builder, which has Validation Actions as you mentioned above. But they are all on individual bases - each with its button.

My questions is, how can you have for example 3 inputs in a view and use single button to validate them and submit the respective data to a server.

Thank you.


DecSoft

Hello Kasito,

Something like this?



Guest

Hi David

Your sample works great, but one issues is that - when i use a First and Second name for example; Kaase Gbertyoh.
The script does not support the space in between the two names.

How do i figure this out? cos i dont want to use different control for each name.

Tanks


DecSoft

Hello Kasito,

Hi David

Your sample works great, but one issues is that - when i use a First and Second name for example; Kaase Gbertyoh.
The script does not support the space in between the two names.

How do i figure this out? cos i dont want to use different control for each name.

Tanks

What do you want to validate in something like "Kaase Gbertyoh"? The input's length? Something else?



Guest

I want to validdate IsAlpha for "Kaase Gbertyoh" but the script is only accepting "KaaseGbertyoh"

What do i Do


DecSoft

Hello Kasito,

Then, one of the possibles ways, can be to remove the possible spaces before the "IsAlpha" test. You can try with the StrReplace or StrReplaceAll actions.


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.