Check if required fields are filled in.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
ffbc01a5da
commit
7ac8ddb230
10
src/main.cpp
10
src/main.cpp
|
@ -43,6 +43,16 @@ int main()
|
|||
try
|
||||
{
|
||||
const entry_type entry{cgi::parse_formdata()};
|
||||
if (entry.instance.empty() || entry.tags.empty()
|
||||
|| entry.receipts.empty() || entry.description.empty())
|
||||
{
|
||||
// Probably spam, since the input fields are marked as required.
|
||||
cout << "One of the required fields (Instance, Tags, Receipts, "
|
||||
"Description) was not filled.\r\n"
|
||||
<< "Please use the back button, complete the form and submit "
|
||||
"again.\r\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
git::update_cached_repo();
|
||||
git::create_branch();
|
||||
|
|
Reference in New Issue