Skip to content


Subversion checkout URL

You can clone with
Download ZIP


RecordExists validator doesn't apply new table and other options. #4521

kromol opened this Issue · 1 comment

2 participants


Description: Zend\Validator\Db\RecordExists doesn't work properly after changing table, field or some other options. Tested on Zend 2.2.0.

Steps to reproduce:

  • create RecordExists validator with some table and field;
  • run isValid method;
  • check SQL string from validator;
  • set another table to the validator;
  • run isValid method again;
  • check SQL string again.

Expected behavior: you should see two SQL select statements with different tables.

Actual behavior: The table is the same in both cases

Note: It seems like an issue is in Zend\Validator\Db\AbstractDb class in method getSelect in the first three lines. If Select object exists it returns without any modifications even if validator was modified.

@samsonasik samsonasik referenced this issue from a commit in samsonasik/zf2
@samsonasik samsonasik Fixes #4521 2ad4978
@samsonasik samsonasik referenced this issue

Fixes #4521 #5857


@kromol I create PR #5857 for it.

@gianarb gianarb referenced this issue from a commit in zendframework/zend-validator
@samsonasik samsonasik Fixes zendframework/zf2#4521 1345aa0
@weierophinney weierophinney referenced this issue from a commit in zendframework/zend-validator
@weierophinney weierophinney Merge branch 'hotfix/5857' de16713
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.