Commit 8e063dd2 authored by Peter Droogmans's avatar Peter Droogmans
Browse files

Issue #2149091 by torotil, grahamC | ardeso: Uploading Files produces JS error.

parent 10deab52
......@@ -1154,6 +1154,8 @@ function _clientside_validation_set_regex_pcre($name, $title, &$js_rules, $expre
* Set validation rule for file fields that must have a certain extension.
*/
function _clientside_validation_set_extensions($name, $extensions, &$js_rules) {
// @see https://drupal.org/comment/8428631#comment-8428631
/*
$extension_list = preg_replace('#,(?![^,]+,)#', ' or', implode(', ', $extensions));
$js_rules[$name]['accept'] = implode('|', $extensions);
$variables = array(
......@@ -1163,6 +1165,7 @@ function _clientside_validation_set_extensions($name, $extensions, &$js_rules) {
'element_name' => $name
);
$js_rules[$name]['messages']['accept'] = theme('clientside_error', $variables);
*/
}
/**
......
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