Function registerAJsonValidator

Summary

#include <orm_lib/inc/drogon/orm/RestfulController.h>

(1) void registerAJsonValidator(const std::string &fieldName, const std::function< bool(const Json::Value &, std::string &)> &validator)

(2) void registerAJsonValidator(const std::string &fieldName, std::function< bool(const Json::Value &, std::string &)> &&validator)

Function overload

Synopsis

#include <orm_lib/inc/drogon/orm/RestfulController.h>

void registerAJsonValidator(const std::string &fieldName, const std::function< bool(const Json::Value &, std::string &)> &validator)

Description

No description yet.

Source

Lines 54-60 in orm_lib/inc/drogon/orm/RestfulController.h.

void registerAJsonValidator(
    const std::string &fieldName,
    const std::function<bool(const Json::Value &, std::string &)>
        &validator)
{
    validators_.emplace_back(fieldName, validator);
}

Synopsis

#include <orm_lib/inc/drogon/orm/RestfulController.h>

void registerAJsonValidator(const std::string &fieldName, std::function< bool(const Json::Value &, std::string &)> &&validator)

Description

No description yet.

Source

Lines 61-66 in orm_lib/inc/drogon/orm/RestfulController.h.

void registerAJsonValidator(
    const std::string &fieldName,
    std::function<bool(const Json::Value &, std::string &)> &&validator)
{
    validators_.emplace_back(fieldName, std::move(validator));
}





Add Discussion as Guest

Log in to DocsForge