how to don't store a repeated field of a Symfony form?
Posted
by
user454760
on Stack Overflow
See other posts from Stack Overflow
or by user454760
Published on 2011-01-11T17:49:21Z
Indexed on
2011/01/11
17:53 UTC
Read the original article
Hit count: 160
Hello everybody,
I am working with Symfony 1.4 and Doctrine. I have a model A with a email field. The form of A, display an input in which the user should insert the email correctly. But as everybody know sometiemes they don't do it.
To fix this i have insert an extra field in the model (and in the form), called *repeat_email* to prevent the misspellings. Then, in the validation process, after validates all the fields, i use a global validator to compare the data of the two fields.
This works, but i don't want to have the email stored two times in the database (i don't want the *repeat_email*). Is there any mechanism to use it in the validation process, but not to store it in the database?
Thanks,
© Stack Overflow or respective owner