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 8509133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:21:08+00:00 2026-06-11T03:21:08+00:00

I have a question about the Zend Framework 2, can some one provide an

  • 0

I have a question about the Zend Framework 2, can some one provide an example code or link of how I can attach a validator class to the form in my controller so that it displays the error messages from the validator. A Zend framework developer has suggested me to use this

$form->getInputFilter()->get('entityName')->getValidatorChain()->add($validator);

when I added this line in my controller, throws me this error when I try to add a new entity

Fatal error: Call to undefined method Zend\Validator\ValidatorChain::add() in C:\Album\src\Album\Controller\AlbumController.php

In case if somebody familiar with Zend Framework can help me to sort out this. I am purely searching for ways to add the validator to my form in controller. Any suggestions would be appreciated.

P.S. My AlbumController code can be found here

  • 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-11T03:21:10+00:00Added an answer on June 11, 2026 at 3:21 am

    I’m sorry, it’s actually addValidator($validator), not just add($validator).

    But you could have seen this if you had a look at the sources.

    Also, I don’t think it was necessary to create a new question for this. I would have answered this also in your latest question.

    // Edit: oops, just saw that you asked in your latest question, sorry for this.

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

Sidebar

Related Questions

I have several question about integrating integrating Doctrine 2.2 & Zend framework. I know
The question is about the router's setDispatched() method of Zend Framework... I have a
have on question about the Zend Framework 2. In my Application i have a
I have a question about how GC works in Java. Consider the following code:
I have a question about SqlDataReader: Is there some way to modificated the values
Zend Framework 2 + Doctrine 2 Refering to this question, I have a simple
I have question about removing element from QList. myclass.h: class node2D : public QObject
I have been using the Zend Framework with an MVC configuration, read about Ruby
I have question about parsing in Html helper : I have sth like: @foreach
I have question about clean thory in Python. When: @decorator_func def func(bla, alba): pass

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.