Display validation message set in control property

  • 19 April 2017
  • 2 replies
  • 137 views

Hello everybody,

 

I would like to know, how to display the message set in "Message" (under validation section).

 

11557i64B5761B205AE3C1.png

 

I put a "If the form passes validation" condition but i'm enable to display my message.

 

So far, I've juste a custom message if the formulaire doesn't pass validation but i'm not able to point out wich control is not correctly set.

Instead, I set a "custom generic" message to explain what is required and why.

 

Thx for sharing,

T.


2 replies

Userlevel 5
Badge +16

Hi Tesla,


 


Please have a look at the following thread to display dynamic message:


 


http://community.k2.com/t5/K2-blackpearl/Customizing-the-Validation-Warnings-Message-in-SmartForms/m-p/82986#M24847


 


Hope that helps.

Userlevel 4
Badge +13

Hi,


 


Please see the explanation of my understanding and testing based on the question "how to display the message set in "Message" (under validation section)":


 


Preform these steps to create the senario which I have used to explain how the control validation message works:



  1. Add your control

  2. Add the validation message, the desired patterns and the max length the control can contain to the controls properties

  3. Add the validation rule to the form on a button click to validate the control mentioned in step 2 and ensure that you select the "Show validation messages in a popup dialog".

  4. Inside of the form validation add a show message for when the validation is passed.

  5. Now when you type a value into the control and it is not according to the pattern or length the control properties message will be higlighte in red and act as a tooltip displaying the message from the controls properties (this message should be written in a way that the user will understand what is expected example: enter a 5 digit zip code.) as the controls validation failed.

  6. Now when you type a value into the control and it does meat the patterns requirements in lenght and in format the control will not not be highlited in red as the controls validation has passed.

  7. Now that the controls validation has passed the form validation can be started, click the button you created in step 3 and let the form validate, you will see the the show message box appears this means that the form validation has passed and all is good.

  8. So far so good. Now on purpose typd the incorrect value into the control which will let the control validation fail and highlight it in red then click the form validation message, this will not display a popup message that show the message you entered into the controls validation message field as the reason why the validation failed.


So in essance the control validation message will be used as a tooltip on the control to validate the control which is to ensure that the correct pattern and lenght is used but it will also be used when the form is validating and should both of them fail the control will be highlighted in red with the control validation message as the controls tooltip and the form validation will display the popup dialog with the same message.


 


Regards


Raymond 

Reply