pepe wrote: > That would be fine if no validation were needed but one has to assume > that there is the need if the OP is using a validation.
No. The OP clearly described his use case, and he is making the same mistake that at least 3 posters a month make on this list. > Just removing > non numeric values will not do the trick if only non numeric values or > 'garbage' is entered. You could end up with 'anything' in the field, > for example a phone number containing '123'. You could end up with that if you use validates_numericality_of too. My solution is no worse, and I believe it's actually better. I can't even count the number of times websites have rejected my phone number because they didn't like my formatting, when the application should have been smart enough to take all the digits and format them itself. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en.

