6.1 Server-side Validation of Inputs

6.1 Server-side Validation of Inputs


In this lesson it's said that no data would be saved when you stop the debugger, which is not true, and also visible in the video since you have 2 USB cameras in the list

You must use Abort Request instead of Stop Debugging for data not to be stored.

Best regards,
In the lesson, you have shown that the form validation is attached screen action. 

If I have multiple buttons that requires the same screen validation methods.  Can I create a reusable screen action?  If so, how?  I tried user action but it would not achieve the same effects as the screen action validation.
Hi Jean,

You can assign the same screen action to different buttons, adding to this that you can define input parameters for the screen actions gives you the flexibility to have different behaviors on different buttons just by setting a different value for the parameters of the screen action.

User actions won't work as you discover. This is because they do not have the same scope as the screen actions. While on screen actions you access directly the form's Valid property and also the Valid and ValidationMessage properties of inputs on user actions you don't have these variables in scope.

I hope this clears it up for you.

Cheers and happy coding!