5#ifndef CUTELYSTVALIDATORRESULT_H
6#define CUTELYSTVALIDATORRESULT_H
8#include <Cutelyst/Plugins/Utils/validator_export.h>
11#include <QSharedDataPointer>
14#include <QVariantHash>
18class ValidatorResultPrivate;
113 [[nodiscard]]
bool isValid() const noexcept;
177 explicit operator
bool() const noexcept {
return isValid(); }
190 [[nodiscard]] QVariantHash values() const noexcept;
222 [[nodiscard]] QVariantHash extras() const noexcept;
QStringList failedFields() const
Returns a list of fields with errors.
ValidatorResult & operator=(const ValidatorResult &other) noexcept
QJsonObject errorsJsonObject() const
bool hasErrors(const QString &field) const noexcept
ValidatorResult(const ValidatorResult &other) noexcept
ValidatorResult & operator=(ValidatorResult &&other) noexcept
QHash< QString, QStringList > errors() const noexcept
void addError(const QString &field, const QString &message)
QStringList errorStrings() const
ValidatorResult(ValidatorResult &&other) noexcept
~ValidatorResult() noexcept
bool isValid() const noexcept
The Cutelyst namespace holds all public Cutelyst API.