# Validates\_format\_of :email in database

**URL:** <https://www.ruby-forum.com/t/validates-format-of-email-in-database/188513>\
**Category:** Rails\
**Created:** [May 13, 2010, 7:16am UTC](https://www.ruby-forum.com/t/validates-format-of-email-in-database/188513 "2010-05-13T07:16:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/4bbf92/32.png) [@ashu](https://www.ruby-forum.com/u/ashu)\
**Post date:** [May 13, 2010, 7:16am UTC](https://www.ruby-forum.com/t/validates-format-of-email-in-database/188513/1 "2010-05-13T07:16:17Z")

</div>

I was forgot To apply  
validates\_format\_of :email,

validates\_format\_of :contact\_personal\_email

This makes a lots of invalid emails of users . Now i fixed it on model  
But the invalid emails now exists in my database (mysql).  
Now i have to manually change the all invalid emails . but for this i  
required a Report of all user have invalid email. (something in  
migrations or find\_by\_sql)  
I do not how to start this.

Please suggest .
