Validations

  

If validation is selected as both client and server then, mandatory check and

data type check is not done at server side?

Hi Lovish,

In both validation methods, "Client & Server" and "Server", the page will perform the standard valiadtion in the client (browser): Wrong Data Type and Missing Mandatory Value

The difference is that in the first case ("Client & Server"), the javascript that does this validation will not call the screen action. Instead, it will mark the wrong inputs (usually red border) and set the standard validation messages and warn the user.

In the second case ("Server"), thos two steps, set the input/form valid to false and set the standard message will ALSO be performed, but you need explicit logic in the action (that will be called), to check if the form is valid or not (the form Valid property will be set to False if there is something wrong).

Cheers,
Eduardo Jauch

P.S. Remember to mark the correct answers (even in previous questions), or improve the question if the answer is not sactisfactory or you didn't understood something.  

Eduardo Jauch wrote:

Hi Lovish,

In both validation methods, "Client & Server" and "Server", the page will perform the standard valiadtion in the client (browser): Wrong Data Type and Missing Mandatory Value

The difference is that in the first case ("Client & Server"), the javascript that does this validation will not call the screen action. Instead, it will mark the wrong inputs (usually red border) and set the standard validation messages and warn the user.

In the second case ("Server"), thos two steps, set the input/form valid to false and set the standard message will ALSO be performed, but you need explicit logic in the action (that will be called), to check if the form is valid or not (the form Valid property will be set to False if there is something wrong).

Cheers,
Eduardo Jauch

P.S. Remember to mark the correct answers (even in previous questions), or improve the question if the answer is not sactisfactory or you didn't understood something.  


so it means by applying form.valid we are also checking mandatory and data type , if validation is ' Client and Server'?

If Validation is Client & Server, the server will not be called if the two automatic validations fail in any input.

If the Validation is "Server" and any input fails the data type or missing mandatory data validations, the input valid property and the form valid property will be marked with false and the screen action will be called

In this case, you must check at least the Valid property of the form to see if something failed and continue or not the execution depending on the value you find in the form valid (usually you stop the action at this point).

Cheers,
Eduardo Jauch

Hi Lovis,

If you set validation type client and server for any action then validation will applied automatically at client side for inputs which are mandatory but for server side you have to write your own logic to like as "textbox.vaid" if it returns false then you need to call action "Input_FocusFirstInvalid" in this way you can perform server side validation.


Regards

-SK-

Hi Lovis,

If you still having confusion please let me know I can create a sample OML for you.


Regards

-SK-

Eduardo Jauch wrote:

Hi Lovish,

In both validation methods, "Client & Server" and "Server", the page will perform the standard valiadtion in the client (browser): Wrong Data Type and Missing Mandatory Value

The difference is that in the first case ("Client & Server"), the javascript that does this validation will not call the screen action. Instead, it will mark the wrong inputs (usually red border) and set the standard validation messages and warn the user.

In the second case ("Server"), thos two steps, set the input/form valid to false and set the standard message will ALSO be performed, but you need explicit logic in the action (that will be called), to check if the form is valid or not (the form Valid property will be set to False if there is something wrong).

Cheers,
Eduardo Jauch

P.S. Remember to mark the correct answers (even in previous questions), or improve the question if the answer is not sactisfactory or you didn't understood something.  

Just mark this as the right answer. Good explanation! By default, the intelliwarp will generate a page with a server side validation and in the screen action will add an If to validate the form (at least at the 9.1 version).

Validation Example:


- Name type check;

- Address mandatory attribute check;

- Address type check;

The none will not run any javascript validation. But Outsystems, in the version 9.1, doesn't remove the injected validation scripts from the page. It would be nice to have that optimizated to decrease the Doc size (Maybe they have a reason for it).

Regards