Commit cd5870d9 authored by Jelle Sebreghts's avatar Jelle Sebreghts
Browse files

Issue #1199194 solved (if #is_multiple == 1 -> unlimited values)

parent c9877df3
......@@ -477,6 +477,9 @@ function _clientside_validation_set_minmax($name, $title, $min, $max, &$js_rules
*/
function _clientside_validation_set_minmaxlength($name, $title, $min, $max, &$js_rules, $message = '') {
$title = variable_get('clientside_validation_prefix', '') . $title . variable_get('clientside_validation_suffix', '');
if($max == 1){
$max = '';
}
if (isset($min) && $min != '' && isset($max) && $max != '') {
$js_rules[$name]['rangelength'] = array($min, $max);
$js_rules[$name]['messages']['rangelength'] = (empty($message)) ? t('!name field has to have between !min and !max values.', array('!name' => $title, '!min' => $min, '!max' => $max)) : $message;
......
Supports Markdown
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