2

Looking through the documentation it seemed at first that I needed to use isUnique to validate a form field that is unique to the table. I tried to follow the docs on isUnique but it did not work. Then after searching I found an article referring to validateUnique. I was able to get validateUnique to work, but not isUnique. So, I was wondering what the difference was. Is it that isUnique is so that you can check for the form fields uniqueness in the controller before saving and validateUnique is to be used as a validation rule in the table? It seems a bit confusing in the documentation.

Battousai
  • 503
  • 7
  • 17
  • 2
    validateUnique in the link you profided is just the name of the rule, you could place anything there it is just for your own reference. isUnique is a buildRule not a validation wich is unique iirc – Alex Stallen Sep 19 '15 at 10:31
  • 2
    Have a look at the two examples for checking unique [here](http://stackoverflow.com/questions/31087954/confusing-validation-vs-application-rules-in-cakephp3) (second half of the question)... – Oops D'oh Sep 20 '15 at 17:49

0 Answers0