Yes, that's correct. It's also documented in the sfValidatorDate class (take a 
look into the API). :)

On 28.04.2010, at 13:24, Alexandru-Emil Lupu wrote:

> well, try this:
> 
> $years = range(1900,date('Y'));
> 
> 'fecha_nac' => new sfWidgetFormDate(array('years' =>
> array_combine($years, $years)))),
> 
> it will give you an array like array('1901'=>1901, '1902'=>1902 .... )
> 
> On Wed, Apr 28, 2010 at 2:13 PM, Javier Garcia <tirengar...@gmail.com> wrote:
>> Hi,
>> 
>> i have this widget and this validator
>> 
>> 
>> 
>>       'fecha_nac' => new sfValidatorDate (array('min' => "01-01-1990",
>> 'required' => 'Your born date is required.')),
>> 
>> When i choose in the form for example 04/03/1906
>> 
>> I get this
>> 
>> array
>>  'month' => string '4' (length=1)
>>  'day' => string '3' (length=1)
>>  'year' => string '6' (length=1)
>> 
>> in
>> 
>> class sfValidatorDate extends sfValidatorBase
>> {
>> 
>>  protected function doClean($value)
>>  {
>>      var_dump($value);
>> 
>> But i was expecting this to operate my form correctly:
>> 
>> array
>>  'month' => string '4' (length=1)
>>  'day' => string '3' (length=1)
>>  'year' => string '1906' (length=1)
>> 
>> Any idea?
>> 
>> --
>> 
>> Javi
>> 
>> Ubuntu 8.04
>> 
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>> 
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>> 
> 
> 
> 
> -- 
> Have a nice day!
> 
> Alecs
> Certified ScrumMaster
> 
> There are no cannibals alive! I have ate the last one yesterday ...
> I am on web:  http://www.alecslupu.ro/
> I am on twitter: http://twitter.com/alecslupu
> I am on linkedIn: http://www.linkedin.com/in/alecslupu
> Tel: (+4)0722 621 280
> 
> -- 
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
> 
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to