| 863 | // ***** Endpoint for ValidatorMax ****** |
| 864 | C_ATTR(max, :Local :AutoArgs) |
| 865 | void max(Context *c) |
| 866 | { |
| 867 | QMetaType::Type type = QMetaType::UnknownType; |
| 868 | |
| 869 | if (!c->request()->bodyParameter(u"type"_s).isEmpty()) { |
| 870 | const QString t = c->request()->bodyParameter(u"type"_s); |
| 871 | if (t == u"sint") { |
| 872 | type = QMetaType::Int; |
| 873 | } else if (t == u"uint") { |
| 874 | type = QMetaType::UInt; |
| 875 | } else if (t == u"float") { |
| 876 | type = QMetaType::Float; |
| 877 | } else if (t == u"string") { |
| 878 | type = QMetaType::QString; |
| 879 | } |
| 880 | } |
| 881 | Validator v({new ValidatorMax(u"field"_s, type, 10, m_validatorMessages)}); |
| 882 | checkResponse(c, v.validate(c)); |
| 883 | } |
| 884 | |
| 885 | // ***** Endpoint for ValidatorMin ****** |
| 886 | C_ATTR(min, :Local :AutoArgs) |
nothing calls this directly
no test coverage detected