Skip to content

Commit

Permalink
Merge pull request apache#412 from JCgH4164838Gh792C124B5/WW-5072_CPi…
Browse files Browse the repository at this point in the history
…ckPR411

Cherry-Pick PR#411 into master
  • Loading branch information
lukaszlenart authored May 4, 2020
2 parents 0a53999 + 6afcbf2 commit a5f5efb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@ public String getCaption() {
public void setCaption(String caption) {
this.caption = caption;
}

public long getUploadSize() {
if (upload != null) {
return upload.length();
} else {
return 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<validators>
<field name="upload">
<field-validator type="fieldexpression">
<param name="expression"><![CDATA[upload.length() > 0]]></param>
<param name="expression"><![CDATA[getUploadSize() > 0]]></param>
<message>File cannot be empty</message>
</field-validator>
</field>
Expand Down

0 comments on commit a5f5efb

Please sign in to comment.