Phalcon offers flexible tools to validate data such as user input. The Phalcon\Validation
component is strategically located in its own namespace, so that it can be used at any point and in any part of your application, such as validating posted data from the UI, data before it is saved to the database, data sent to the UI, and so on.
In this recipe, we will create some validators and discuss the common approaches on how to use them in your application.
To successfully implement this recipe, you need to have a Phalcon application and the Volt engine configured. In our example, we will use a sample application generated by Phalcon Developer Tools. However, you can use any other application that is available to you.
You will also need to have a web server installed and configured for handling requests to your application. Your application must be capable of receiving requests and you should have the necessary controllers and...