Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

@Assert\DivisibleBy(0.01) not working #43345

Copy link
Copy link
Closed
@CharlyPoppins

Description

@CharlyPoppins
Issue body actions

Symfony version(s) affected: 5.2.12

Description
Float with value 10.12 fail validation when @Assert\DivisibleBy(0.01)

How to reproduce

git clone git@github.com:CharlyPoppins/sf-bug-with-divisible-by.git

symfony composer install

symfony server:start

POST on https://127.0.0.1:8000/test-model with JSON body
{
    "amount": 10.12
}

Possible Solution

  • I need an additional config in the projet or in php.ini
  • fmod can't handle this kind on test

Additional context
Problem happen in vendor/symfony/validator/Constraints/DivisibleByValidator.php
Capture d’écran 2021-10-06 à 00 16 02

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.