Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/src/main/java/org/zstack/sdk/AbstractAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ public void checkParameters() {
if (value != null && at.maxLength() != Integer.MIN_VALUE && (value instanceof String)) {
String str = (String) value;
if (str.length() > at.maxLength()) {
throw new ApiException(String.format("filed[%s] exceeds the max length[%s chars] of string",
throw new ApiException(String.format("field[%s] exceeds the max length[%s chars] of string",
p.field.getName(), at.maxLength()));
}
}

if (value != null && at.minLength() != 0 && (value instanceof String)) {
String str = (String) value;
if (str.length() < at.minLength()) {
throw new ApiException(String.format("filed[%s] less than the min length[%s chars] of string",
throw new ApiException(String.format("field[%s] less than the min length[%s chars] of string",
p.field.getName(), at.minLength()));
}
}
Expand Down