Hi. I'm #far# from mastering Symfony but here are my two cents. I would say 
that validators are not intented to know anything else than the bunch of values 
to clean and validate, hence I don't see any way for them to know the form's 
object. But the form has access to all the values you need : tainted values, 
cleaned values, his object. Hence, I suppose that you should process your 
comparisons somewhere in the form's method, maybe doBind() or doUpdateObject(). 


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] De 
la part de Mihai Rusoaie
Envoyé : jeudi 1 avril 2010 10:44
À : symfony users
Objet : [symfony-users] access object from validator

Hello, all!

Is there any way to access my object (the one before the form post) from a 
sfValidatorSchema ?

When I had my validator inside the Form.class.php file, I could access the 
object with $this->getObject(), but from the sfValidatorSchema class I cannot 
access it like this.

I need to compare the submitted values from a form with the previous values. Is 
there any other way to do this than to access the original object from the 
validator?

Thank you!

--
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

To unsubscribe, reply using "remove me" as the subject.


-- 
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

Reply via email to