Can we set validations on different input fields all together?

Can we set validations on different input fields all together?

  

I have a form in which there are 10 input fields and I want to set the same validations on all of these. Can you please help on how to set the validations on these all together?

Hi Aditya,

Which validations are interested in Server side validations or client side validations?

Thanks 

Kirit

kirit kumar wrote:

Hi Aditya,

Which validations are interested in Server side validations or client side validations?

Thanks 

Kirit

Hi! its client side validations


Hi Aditya,

You can set the default validation messages for client validation at the module level, for more information, check out this documentation: 

https://www.outsystems.com/help/ServiceStudio/9.0/Web_User_Interface/Default_Validation_Messages.htm

Use this in combination with validaion type 'client/server' on your action link/button to perform basic client side validation.

For specific validation per input, you can reference this article for more information:

https://success.outsystems.com/Documentation/10/Developing_an_Application/Design_UI/Forms/Validate_Form_Inputs

Justin

For advance client validation, you can also reference this post, on how to implement custom client side validations:

https://www.outsystems.com/forums/discussion/2741/javascript-validation/#Post6462

create a jquery function with the validations and call the function on click of the button and make the button client and server validation

add the js function to the button.

In order to access the value entered in the each input you need to name to the input widget like SearchIput in the following snippet

and then access the value of the each input in the using the following code in the js function.

SyntaxEditor Code Snippet

$('#"+SearchInput.Id+"').val();

Let me know if you have achieved!


Thanks 

Kirit