cutelyst 4.3.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
|
Provides an API to validate input values. More...
Modules | |
Rules | |
Classes providing rules to validate input data. | |
Classes | |
class | Cutelyst::Validator |
Validation processor for input data. More... | |
struct | Cutelyst::ValidatorMessages |
Stores custom error messages and the input field label. More... | |
class | Cutelyst::ValidatorResult |
Provides information about performed validations. More... | |
struct | Cutelyst::ValidatorReturnType |
Contains the result of a single input parameter validation. More... | |
class | Cutelyst::ValidatorRule |
Base class for all validator rules. More... | |
The Validator plugin provides an API to validate input values that are send by a user to the application, typically in the request body if it is a POST request or the URL query if it is a GET request. The plugin already provides validator rules for common tasks and input types but can be extended by deriving a new rule class from ValidatorRule. Validator rules are not meant to be used on their own but as part of the Validator class that processes the input data. However some validator rules export their validation logic in a static member function that can be used without Validator directly on a value. See the documentation of Validator to learn more about how to use it.
Information is logged to the cutelyst.utils.validator
logging category. Failed validation will only be logged if debug output is enabled. Other errors like failed parsing and missing validation data will be logged to the warning category.
The plugin is linked to Cutelyst Core API and the QtNetwork module. To use it in your application, link your application to Cutelyst::Utils::Validator.
ValidatorPwQuality relies on libpwquality and will not be included and build by default. Use either -DPLUGIN_VALIDATOR_PWQUALITY:BOOL=ON
or -DBUILD_ALL:BOOL=ON
when configuring Cutelyst for build with cmake.