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

Validate that value is between specified min and max. More...

#include <Validators.hpp>

Public Member Functions

 Between (Type min, Type max)
 Construct the validator storing min and max values.
 
MaybeError verify (boost::json::value const &value, std::string_view key) const
 Verify that the JSON value is within a certain range.
 

Detailed Description

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

Validate that value is between specified min and max.

Constructor & Destructor Documentation

◆ Between()

template<typename Type >
rpc::validation::Between< Type >::Between ( Type min,
Type max )
inlineexplicit

Construct the validator storing min and max values.

Parameters
min
max

Member Function Documentation

◆ verify()

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

Verify that the JSON value is within a certain range.

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: