Well, of course, here's what I had before:
var $validate = array(
'passwd' => array(
'rule' => VALID_NOT_EMPTY,
'message' => 'Username cannot be blank'
)
));
and here's what I have now:
var $validate = array('username' => array(
'notempty' => array(
'rule' => VALID_NOT_EMPTY,
'message' => 'Username cannot be blank'
),
'unique' => array(
'rule' => 'isUnique',
'message' => 'Username existed. Choose another
one'
)
));
Thanks for the help :)
On Jun 11, 2008, at 11:44 PM, 703designs wrote:
>
> What did you change it to?
> I think it's always a good idea to follow up with your solution so
> that others can learn from your experiences.
>
> On Jun 11, 6:22 am, Reza Muhammad <[EMAIL PROTECTED]> wrote:
>> Thanks Grant. Yeah, it turned out that i only needed to change my
>> validation rule.
>>
>> Good day.
>> Reza
>> On Jun 11, 2008, at 11:59 AM, Grant Cox wrote:
>>
>>
>>
>>> There is no such limit in Cake by default, it'll be in your
>>> application code.
>>
>>> Are you sure that the model is passing validation? If you have the
>>> "alphaNumeric" validation rule, it'll fail on a period, as it
>>> explicitly only allows alphabetic and numeric chars. What is the
>>> SQL
>>> being generated?
>>
>>> Please post your relevant model and controller action if you require
>>> further assistance.
>>
>>> On Jun 11, 2:50 pm, Reza Muhammad <[EMAIL PROTECTED]> wrote:
>>>> Hi all,
>>
>>>> I just noticed that by default Cake wouldn't save data where a .
>>>> (dot)
>>>> is present. For example, I tried to add a new username that is
>>>> "firstname.lastname", and Cake said that the user was added
>>>> successfully, but it wasn't added at all.
>>
>>>> What do I need to add so that Cake can accept this type of special
>>>> character? Is sanitize part of it?
>>
>>>> Thank you.
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---