Validate that value can be converted to time according to the given format.
More...
#include <Validators.hpp>
|
| | TimeFormatValidator (std::string format) |
| | Construct the validator storing format value.
|
| MaybeError | verify (boost::json::value const &value, std::string_view key) const |
| | Verify that the JSON value is valid formatted time.
|
Validate that value can be converted to time according to the given format.
◆ TimeFormatValidator()
| rpc::validation::TimeFormatValidator::TimeFormatValidator |
( |
std::string | format | ) |
|
|
inlineexplicit |
Construct the validator storing format value.
- Parameters
-
| format | The format to use for time conversion |
◆ verify()
| MaybeError rpc::validation::TimeFormatValidator::verify |
( |
boost::json::value const & | value, |
|
|
std::string_view | key ) const |
|
nodiscard |
Verify that the JSON value is valid formatted time.
- Parameters
-
| value | The JSON value representing the outer object |
| key | The 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 files:
- /__w/clio/clio/src/rpc/common/Validators.hpp
- /__w/clio/clio/src/rpc/common/Validators.cpp