Commit daddc61e by Tomek Romik Committed by Qiang Xue

Add File API detection to client file validator

Fixes #6345
parent b4e47e94
......@@ -307,6 +307,11 @@ yii.validation = (function ($) {
};
function getUploadedFiles(attribute, messages, options) {
// Skip validation if File API is not available
if (typeof File === "undefined") {
return [];
}
var files = $(attribute.input).get(0).files;
if (!files) {
messages.push(options.message);
......
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