datamapper / dm-validations

Library for performing validations on DM models and pure Ruby object
http://datamapper.org/
MIT License
50 stars 43 forks source link

[master] Use a more RFC2396 complaint regex pattern for the :url format validation #67

Open xentek opened 11 years ago

xentek commented 11 years ago

The current format's url regular expression pattern was tripping on a number of valid URLs, so this change updates it to use URI.regexp, which is provided by the ruby stdlib. To maintain some compatibility with the old regex, I have limited the valid urls accepted by this regex to only the http and https schemes, which may or may not be desired.