description of the benchmark can be empty
This commit is contained in:
parent
ce63c7e9a1
commit
190377a108
@ -135,13 +135,13 @@ func postBenchmarkCreate(c *gin.Context) {
|
||||
}
|
||||
|
||||
description := strings.TrimSpace(c.PostForm("description"))
|
||||
if len(description) > 500 || description == "" {
|
||||
if len(description) > 500 {
|
||||
c.HTML(http.StatusUnauthorized, "error.tmpl", gin.H{
|
||||
"activePage": "error",
|
||||
"username": session.Get("Username"),
|
||||
"userID": session.Get("ID"),
|
||||
|
||||
"errorMessage": "Description must not be empty or exceed 500 characters",
|
||||
"errorMessage": "Description must not exceed 500 characters",
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="exampleInputPassword1" class="form-label">Description</label>
|
||||
<textarea id="exampleInputPassword1" class="form-control" rows="4" placeholder="Description of your benchmark" required name="description" maxlength="500"></textarea>
|
||||
<textarea id="exampleInputPassword1" class="form-control" rows="4" placeholder="Description of your benchmark" name="description" maxlength="500"></textarea>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="inputGroupFile01" class="form-label">CSV file(s)</label>
|
||||
|
Loading…
Reference in New Issue
Block a user