Thanks greycells. Im using cake 1.2.x.x_01.01.2008, and the function checkUnique in: http://cakephp.pastebin.com/f7a7a9894 is using Model->isUnique().
How do i have to call this function from the validation in Model? Or what im doing wrong because i was having that problem with validation o update. Thanks in advance. On Jan 25, 11:36 am, GreyCells <[EMAIL PROTECTED]> wrote: > For 1.2 this functionality exists in Model->isUnique() and was updated > to deal with updates. > > Seehttp://api.cakephp.org/1.2/class_model.html#e631f2cba7ec7fff079d3a7b6... > > andhttps://trac.cakephp.org/ticket/2032 > > ~GreyCells > > On Jan 25, 7:17 pm, Josoroma <[EMAIL PROTECTED]> wrote: > > > I started to have problems when i was trying to checkDuplicate entries > > of fields in my models validations. I used on = create to check the > > unique value only in the creation but i need to check it in the update > > too. The problem with update is that the value already exist then your > > validation sucks. > > > My solution to this problem is:http://cakephp.pastebin.com/f7a7a9894 > > > Any help, comment or improvement is welcome. > > > Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---