Ignore:
Timestamp:
Jan 24, 2019 7:22:55 PM (5 years ago)
Author:
anonymous
Message:

Update module_maker. Minor fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/validation.cli.php

    r612 r655  
    286286        case 'numeric' :
    287287        case 'float' :
    288             $max = str_repeat('9', $max_dig - $max_dec);
    289             if ($max_dec > 0) {
    290                 $max .= '.' . str_repeat('9', $max_dec);
    291             }
    292288            if ($unsigned) {
    293289                $negative_ok = 'false';
    294                 $min = 0;
    295290            } else {
    296291                $negative_ok = 'true';
    297                 $min = -$max;
    298292            }
    299293            $negative_ok = $unsigned ? 'false' : 'true';
    300             $o[] = "\$fv->isDecimal('$field', sprintf(_(\"%s must be a number between %d and %d.\"), _(\"$title\"), $min, $max), $negative_ok, $max_dig, $max_dec);";
     294            $o[] = "\$fv->isDecimal('$field', $max_dig, $max_dec, false, sprintf(_(\"%s must be a number with a maximum of %d integer digits and %d fractional digits, e.g., {EX}.\"), _(\"$title\"), ${max_dig}-${max_dec}, $max_dec), MSG_ERR, __FILE__, __LINE__);";
    301295            break;
    302296
Note: See TracChangeset for help on using the changeset viewer.