Wan or Van?
I'm confused.
# Strip everything but alphabets
def before_validation_on_create
self.name = name.gsub(/[^A-Za-z]/, "") if attribute_present?
("name")
end
was what I assume you used for the name and
# Validations on name field
validates_uniqueness_of :name,
:message=>"The name is not unique"
So far so good?
These of course you did not have to come up with on your own.
Now as for the rest, well you already have the help.
I do not understand why the credit card and the name would cause
conflicts with each other unless you are trying to put the validations
for both in the same method.
Good luck!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---