Server side validator for security example

By using validator, we can validate parameters before executing operation using them when the parameters posted from the web form. But someone who knows the url of posting page and post the parameter directly, the normal validator doesn't work.

So this is a method to check parameters for direct access by hackers.


Access the example

In order to access this example, please access the url below or "Server side validator example" link from the toppage.


Then the page below will appear.

Server side validator example

In this page, click the "Do invalid access" link, then access the form directly with the wrong parameter. Then next page will appear.

Validation Error

This page means this acccess is invalid access because the parameters are wrong. So the operation is not executed with wrong parameters.

The source code of this example is in "ALINOUS_HOME/samples/server-side-validator/" folder.

The implementation of "index.alns" in this folder is below.

In this code, it calls "Validate.check()" function before executing operation. This function checks the parameter according to the specified form's validator setting, and if validation failed, it throws exception.

Testing automation

This example is testable code, there is more example to do testing automation. Please take a look at Testing Server side validator.

Go to Top