MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / ValidateAndSet

Method ValidateAndSet

Src/ChannelLinter/FormElement.cpp:93–98  ·  view source on GitHub ↗

Validate and set IP value from input @param input to validate @throws std::invalid_argument if validation fails

Source from the content-addressed store, hash-verified

91 /// @param input to validate
92 /// @throws std::invalid_argument if validation fails
93 void ValidateAndSet(std::string_view input) override
94 {
95 if (!IsIpV4(std::string(input)))
96 throw std::invalid_argument("Failed to IPv4 value from input ("s + std::string(input) + ')');
97 m_Definition["value"] = input;
98 }
99
100 /// Determine if input is an IPv4
101 /// @param input to validate

Callers 1

FillMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected