Skip to main content


 

Symptoms


Our forms are showing "A Value Is Required" error on a textbox. The validation is only suppose to kick in when one of the trigger control is not empty. But when user has cleared the trigger control, the validation error message is still visible but the validation is working as fine.
 

Diagnoses


When validation rule is called to validate a control, an invalid value will result in style changes to the control, unless the popup option is selected. To undo that style change (red border error message in tooltip), the validation rule needs to be called again on the same control. Once the control has a valid value, the red border and tooltip will be removed.
 

Resolution

The key points to note about validation rule:

- When the "View passes validation" rule is called, if validation fails, it will changed the style of the textbox and inserts a tooltip.

- Unless a validation rule is being called again, and the textbox passes the validation, the textbox will continue to remain as if the textbox fails validation.

The workaround is to tweak the rules logic a little to ensure that the validation rule is being called on both success and error conditions. This allows the validated control's style to be reverted to its original default style.




 
Be the first to reply!

Reply