Commit 87f58e48 by Tomek Romik Committed by Qiang Xue

Abort further validation if there are no files to validate

parent 8c5c4c50
......@@ -74,9 +74,10 @@ yii.validation = (function ($) {
pub.addMessage(messages, options.message);
}
if (!options.skipOnEmpty && files.length === 0) {
if (files.length === 0) {
if (!options.skipOnEmpty) {
pub.addMessage(messages, options.uploadRequired);
} else if (files.length === 0) {
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment