Skip to content

Bug: validateInteger #165

@djdaca

Description

@djdaca
  • bug report? yes
  • feature request? no

Description

Snad omluvíte češtinu :)
Problém vidím v parsování hodnoty do INT:
$value = "0123456";
if (Validators::isNumericInt($value = $control->getValue())) {
// $value = "0123456";
if (!is_float($tmp = $value * 1)) { // bigint leave as string
// $tmp = 123456
$control->setValue($tmp);
}
}

Steps To Reproduce

$value = 123456, $result = INT(123456) // OK
$value = 0123456, $result = INT(123456) // ERROR

Chtělo by to ještě nějak pokrýt numeric hodnoty, nejen float :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions