Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
rpc::validation::EqualTo< Type > Class Template Referencefinal

Validates that the value is equal to the one passed in. More...

#include <Validators.hpp>

Public Member Functions

 EqualTo (Type original)
 Construct the validator with stored original value.
 
MaybeError verify (boost::json::value const &value, std::string_view key) const
 Verify that the JSON value is equal to the stored original.
 

Detailed Description

template<typename Type>
class rpc::validation::EqualTo< Type >

Validates that the value is equal to the one passed in.

Constructor & Destructor Documentation

◆ EqualTo()

template<typename Type >
rpc::validation::EqualTo< Type >::EqualTo ( Type original)
inlineexplicit

Construct the validator with stored original value.

Parameters
originalThe original value to store

Member Function Documentation

◆ verify()

template<typename Type >
MaybeError rpc::validation::EqualTo< Type >::verify ( boost::json::value const & value,
std::string_view key ) const
inlinenodiscard

Verify that the JSON value is equal to the stored original.

Parameters
valueThe JSON value representing the outer object
keyThe key used to retrieve the tested value from the outer object
Returns
RippledError::rpcINVALID_PARAMS if validation failed; otherwise no error is returned

The documentation for this class was generated from the following file: