PGBI / cakephp3-soft-delete

83 stars 60 forks source link

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

Open keisukemizuno opened 8 years ago

keisukemizuno commented 8 years ago

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 commented 8 years ago

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?