Hi,
I'm trying to validate two dates : the begin_date has to be before the
end_date or else an error is thrown.
I found the sfValidatorSchemaTimeInterval validator with the plugin
sfFormExtraPlugin, it seems to do what I want but I can't get it to
work.
Here's what I have in lib/form/doctrine/ModuleForm.php :
$this->validatorSchema['end_date'] = new
sfValidatorSchemaTimeInterval($this['begin_date'],
$this['end_date'],array('min_duration' => 1000));
When I submit the form with the end_date sooner than the begin_date,
there isn't any error, the form passes. But the end_date field is now
empty...
I saw in the class that there's an error code "start_not_prior", wich
is exactly what I'm looking for. But I don't know how to throw it !
Since there's no example on the web, I thought maybe one of you could
help me :-)
Thanks in advance !
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en