I have a form to add clients and enter their email. The email is not
required but should be unique, so I have this at the model.
validates :email, :uniqueness => true
Some clients have NO email on record. So when I try to add a second
client with no email, I get this validation message: "Email has already
been taken". I supposed because this happens because sees a current
empty email row and then I'm submitting an empty email field so it they
are not unique anymore because they are both empty.
How can I allow for empty email fields but also check for uniqueness?