Changeset 807 for trunk/bin


Ignore:
Timestamp:
Feb 24, 2024 6:31:54 AM (2 months ago)
Author:
anonymous
Message:

Minor improvements. Add Validator::IPAddress() method.

Location:
trunk/bin/module_maker
Files:
2 edited

Legend:

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

    r612 r807  
    207207        $default = $col[4];
    208208
    209         if (mb_strpos($default, '0000') !== false || '0' == $default) {
     209        if (is_null($default) || mb_strpos($default, '0000') !== false || '0' == $default) {
    210210            $default = '';
    211211        }
  • trunk/bin/module_maker/validation.cli.php

    r655 r807  
    292292            }
    293293            $negative_ok = $unsigned ? 'false' : 'true';
    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__);";
     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__);";
    295295            break;
    296296
Note: See TracChangeset for help on using the changeset viewer.