Re: [Rails] Regular expression: How do I allow forward slashes?

2009-12-18 Thread maryam kamali
inotwell cumpiuter &and lunguish engilish thanks On Sat, Dec 19, 2009 at 10:31 AM, AlwaysCharging wrote: > In my app, I allow users to submit urls. They (of course) need the > ability to submit urls with a forward slash, "/", but whats the > regular expression to allow them to do that? > > I cu

[Rails] Regular expression: How do I allow forward slashes?

2009-12-18 Thread AlwaysCharging
In my app, I allow users to submit urls. They (of course) need the ability to submit urls with a forward slash, "/", but whats the regular expression to allow them to do that? I currently use: validates_format_of :url, :with => /^[-\w\_.]+$/i to only allow alphanumerics, dashes, underscores, an