Whats the best way to test a format validation of lets says a username, with a regex for alphanumeric, but not purely numeric?
I've been using the following validation in my model
validates :username, :format => { :with => /^[a-z0-9]+[-a-z0-9]*[a-z0-9]+$/i }
Numeric username's such as '342' pass the validation, which I don't want.