8000 [Form] [Validator] Not passing the proper value · Issue #4686 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] [Validator] Not passing the proper value #4686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dinamic opened this issue Jun 29, 2012 · 2 comments
Closed

[Form] [Validator] Not passing the proper value #4686

dinamic opened this issue Jun 29, 2012 · 2 comments
Labels

Comments

@dinamic
Copy link
dinamic commented Jun 29, 2012
  • I have an entity, which has a field of type 'decimal'.
  • I have a form for that entity and it is defined as a 'data_class'.
  • Inside validation.yml I have NotBlank validator set for the field.

If I post the form having non-decimal number I have incorrect validation messages:

  • This value is not valid
  • This value should not be blank

The value I tested is "x12.004". Obviously it is not blank :)

This bug report is for sf 2.0.15.
I haven't tried using sf 2.1.

@stof
Copy link
Member
stof commented Jun 30, 2012

The value is blank in the underlying object because the data transformer of the decimal type failed to transform the value (thus adding the first error message). Symfony 2.1 does not display the extra errors anymore when the value was not bound properly.

@dinamic
Copy link
Author
dinamic commented Jun 30, 2012

Does this mean that this is going to be considered as known issue for the 2.0.x branch?

fabpot added a commit that referenced this issue Jul 10, 2012
Commits
-------

854daa8 [Form] Fixed errors not to be added onto non-synchronized forms

Discussion
----------

[Form] Fixed errors not to be added onto non-synchronized forms

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4686
Todo: -
@fabpot fabpot closed this as completed Jul 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0