Skip to content

Commit

Permalink
debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Jul 23, 2024
1 parent 5c1c32d commit 7671214
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/handlers/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func CheckMyWork(w http.ResponseWriter, r *http.Request) {
}

for _, cell := range strings.Split(col, " ; ") {
cell = strings.TrimSpace(cell)
if cell == "" {
continue
}

switch column {
// make sure these columns are integers
Expand All @@ -156,6 +160,7 @@ func CheckMyWork(w http.ResponseWriter, r *http.Request) {
case "Creation Date", "Date Captured", "Embargo Until Date":
if !datePattern.MatchString(cell) && !edtf.IsValid(cell) {
errors[i] = "Invalid EDTF value"
slog.Error("Invalid EDTF value", "cell", cell)
}
// check for valid DOI value
case "DOI":
Expand Down

0 comments on commit 7671214

Please sign in to comment.