MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / requiredIfStashNotMatchStashKey

Method requiredIfStashNotMatchStashKey

tests/testvalidator.cpp:1020–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018 // ***** Endpoint for ValidatorRequiredIfStash with stash match in other stash key *****
1019 C_ATTR(requiredIfStashNotMatchStashKey, :Local :AutoArgs)
1020 void requiredIfStashNotMatchStashKey(Context *c)
1021 {
1022 c->setStash(u"stashkey"_s, u"drei"_s);
1023 c->setStash(u"otherStashKey"_s, QStringList({u"eins"_s, u"zwei"_s}));
1024 Validator v({new ValidatorRequiredIfStash(
1025 u"field"_s, u"stashkey"_s, u"otherStashKey"_s, m_validatorMessages)});
1026 checkResponse(c, v.validate(c));
1027 }
1028
1029 // ***** Endpoint for ValidatorRequiredUnless ******
1030 C_ATTR(requiredUnless, :Local :AutoArgs)

Callers

nothing calls this directly

Calls 2

setStashMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected