Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8103579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:35:02+00:00 2026-06-05T23:35:02+00:00

Is there a simple way in Symfony 1.4 to know whether a submitted form

  • 0

Is there a simple way in Symfony 1.4 to know whether a submitted form had any errors inside the form class? I’m familiar with the $form['some_field']->hasErrors() for templates but in this case I’d like to run a post-validator only if the form didn’t have any errors with the standard validators. I’m basically after something like:

public function configure() {

  // widgets

  // standard validators

  if (!this->hasErrors()) {
    // run post-validator
  }

}

The API documentation is as cryptic as usual. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T23:35:03+00:00Added an answer on June 5, 2026 at 11:35 pm

    Since the validation is perfom on the bind call, I don’t see other place to post validate on error than in the bind function. So, in your form class:

    public function bind(array $taintedValues = null, array $taintedFiles = null)
    {
      parent::bind($taintedValues, $taintedFiles);
    
      if ($this->hasErrors())
      {
        // do post validate
        // you can access values from your form using $taintedValues
      }
    }
    

    But you will have to manually call the validator instead of just define a new one (since the bind process has already been done).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a simple way to declare CSS classes for Symfony form labels? This
Is there a simple way of rendering to a BufferedImage in Java3D? I know
Is there any (simple) way to get some control of the order in which
is there some simple way to inject Properties class loaded with a file from
Is there a simple way to check without looping whether a byte array in
Is there a simple way to modify/customize error messages generated by Symfony validators? eg.
Is there any simple way in zope component system to list all views (and
Is there a simple way to do (what any normal person would assume) this
Is there any simple way to create a column in MS SQL that will
Is there a good, clean and simple way to delete entities non-destructively in Symfony

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.