A possible workaround is to unset any empty fields in beforeValidates() - validate will then ignore them if allowBlank is set.
However, there is a conflict if you're also using beforeValidates() to set blank fields to null (so they are null rather than an empty string in the database) - depends if you're a pedantic db developer or not :) ~GreyCells. On Apr 18, 10:18 pm, rtconner <[EMAIL PROTECTED]> wrote: > Wow did you pick an ambiguous name for that then. Holy misleading > batman. > > So how the heck do I do what I want to do? I can't help but think > enhancement/bug # 2092 is a "must have". I can't even think of a > workaround at the moment. > > On Apr 18, 3:05 pm, nate <[EMAIL PROTECTED]> wrote: > > > It technically means "allowNotPresent" as in "not present in the array > > of data to be saved", but I felt that was too cumbersome. > > > rtconner wrote: > > > Hello, (in 1.2) does anyone know what the intended behavior of > > > alowEmpty should be in the validate array in a model? > > > > You would think it would set the behavior to allow you to submit an > > > empty string that passes validation. For example, you may either pass > > > a valid phone number, or not send one at all. This was 'asdasda' does > > > not count as a phone number, but the phone number is not a required > > > field also. > > > > ..but this is not the behavior I am seeing. As far as I can tell > > > allowEmpty does nothing to change the behavior. Actually I looked at > > > the code in model and yes the code does not implement this behavior > > > either. I'm trying to determine if this is a bug or not. > > > > So... how should allowEmpty cause things to behave? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---