Skip to content

Commit

Permalink
Merge pull request #135 from TAMULib/2.x-validation_with_enums
Browse files Browse the repository at this point in the history
Support pattern matching in validator with Enums.
  • Loading branch information
William Welling authored Apr 6, 2022
2 parents 921ae90 + fa5f5c7 commit 6f97e7f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ public static <U extends ValidatingEntity> ValidationResults validateInputs(Inpu
} else {
invalid = true;
}
} else if (value instanceof Enum) {
values.add(((Enum) value).name());
} else {
values.add((String) value);
}
Expand Down

0 comments on commit 6f97e7f

Please sign in to comment.