Issue Type: Docs: Problem Created: 2009-10-04T06:55:40.000+0000 Last Updated: 2011-11-28T13:41:12.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)
Reporter: Shinya Ohyanagi (heavenshell) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate
Related issues: Attachments:
Hi. The example code of '126.96.36.199. Excluding records' does not work. See http://framework.zend.com/manual/en/…
<pre class="highlight"> $validator = new Zend_Validate_Db_NoRecordExists( array( 'table' => 'users', 'field' => 'username', 'exclude' => array( 'field' => 'id', 'value' => $user_id ) ) );
<pre class="highlight"> $validator = new Zend_Validate_Db_NoRecordExists( 'users', 'username', array( 'field' => 'id', 'value' => $user_id ) );
Posted by Ryan Mauger (bittarman) on 2009-10-05T01:09:20.000+0000
Are you working from trunk? Thomas recently made a change to the validator which means the DB validators now work with an options array, instead of a bunch of parameters. The notation is correct for trunk, which the docs are built from. This is a BC break, and so should not be changed in a release until 1.10
Posted by Shinya Ohyanagi (heavenshell) on 2009-10-05T07:13:28.000+0000
Thank you for comment. I'm not working on trunk(just a released version) and I understand docs for trunk.
Posted by Thomas Weidner (thomas) on 2009-10-05T11:44:22.000+0000
Ryan: No, this is no BC break. With 1.10 both notations are accepted. So you can use Zend_Config as with 1.10, which is now not possible. It's a new feature, no BC break as the old notation is still accepted.
Related to docu. Normally the manual is build from trunk but only for the minor release. It seems as the build process is broken and the manual is build from trunk even for mini releases and even as we commit related docu changes to branch.
This is a problem of the build process, and not the manual. The dev-team has already been pointed to the problem, but it needs some time to fix the process.
It would be interesting if the packaged manual is identical with the manual from the homepage.
Posted by Thomas Weidner (thomas) on 2009-10-05T11:46:51.000+0000
Closing as "non-issue" for the above noted reasons. Needs a fix for the build process by the dev-team.
Posted by Klaus Potzesny (klawipos) on 2011-11-28T13:41:12.000+0000
The following code causes an error at the first line, because the constructor expects an array with table and field name. I think this is no expectable code behavior. You should make the class throw an error when validating, not in the constructor.
<pre class="highlight"> $validator = new Zend_Validate_Db_NoRecordExists(); $validator->setTable('user'); $validator->setField('username');
Have you found an issue?
See the Overview section for more details.