Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't execute the validation of uniqueness in using this plugin . #15

Open
keisukemizuno opened this issue Jan 21, 2016 · 1 comment
Open

Comments

@keisukemizuno
Copy link

I have this validator.

    $validator
        ->requirePresence('name', 'create')
        ->add('name', 'unique', ['rule' => 'validateUnique', 'provider' => 'table', 'message' => 'must be unique !'])
        ->notEmpty('name', 'cannot be empty!');

Without using this plugin, patchEntity method returns validation errors correctly.
But using this plugin, patchEntity method returns no validation errors.

@PGBI
Copy link
Owner

PGBI commented Jan 23, 2016

If you use the soft delete plugin, the expected behavior would be to enforce uniqueness among non soft deleted records. Is it what you are observing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants