Giter Site home page Giter Site logo

Form validation not working about silex HOT 9 CLOSED

silexphp avatar silexphp commented on May 22, 2024
Form validation not working

from silex.

Comments (9)

mgatto avatar mgatto commented on May 22, 2024

As an update, I cannot get the "repeated" field to work at all even with my less-than-ideal $app['validator'] workaround which I really shouldn't need to do and really don't want to muck up my code with repeating things that Form is advertised to do.

from silex.

umpirsky avatar umpirsky commented on May 22, 2024

Same here, $form->isValid() always returns true. Is there any update on this?

from silex.

mgatto avatar mgatto commented on May 22, 2024

No; I've updated to the latest Silex and Symfony2 RC4 and it seems to have changed, but I'm diving deep into my form validation so I don't have an answer yet. TLDR: "maybe".

from silex.

umpirsky avatar umpirsky commented on May 22, 2024

Ok, thanks for the answer anyway. If you solve it sometime in the future it would nice letting the world know :)

from silex.

mgatto avatar mgatto commented on May 22, 2024

Of course.

from silex.

mgatto avatar mgatto commented on May 22, 2024

Bump. Repeated fields will trigger errors if not identical. However, none of the child entities' loadValidatorMetadata() methods are even called by $form->isValid().

from silex.

fabpot avatar fabpot commented on May 22, 2024

Can you try this patch? fabpot/Silex@master...form-validation

from silex.

mgatto avatar mgatto commented on May 22, 2024

The patch works! Thanks Fabien.

from silex.

fabpot avatar fabpot commented on May 22, 2024

fixed directly in the Symfony Form component: symfony/symfony@2b1bb2c

from silex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.