We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8555b73 commit 0fd8080Copy full SHA for 0fd8080
src/main/java/org/primeframework/mvc/content/json/BaseJacksonContentHandler.java
@@ -211,7 +211,7 @@ private void addFieldError(InvalidFormatException e) {
211
String messageText = e.getMessage();
212
Matcher matchesEnumNotValidValue = invalidEnumerationValue.matcher(messageText);
213
String message = null;
214
- if (matchesEnumNotValidValue.matches()) {
+ if (matchesEnumNotValidValue.matches() && matchesEnumNotValidValue.groupCount() == 2) {
215
code = "[invalid]%s".formatted(field);
216
// if we have an invalid enum value, provide a better message
217
String possibleValues = matchesEnumNotValidValue.group(2);
0 commit comments