I have a two validation in my model abc.rb
validates_format_of :url, :with => URI::regexp(%w(http https))
validates_format_of :targetUrl, :with => URI::regexp(%w(http https))
validates_format_of :targetUrl
is not validating the input. whatever I input it accepts. Same issue I am having on other model where I have a validation
validates_format_of :website, :with => URI::regexp(%w(http https))
.
I am not able to figure out why validation failing for
validates_format_of :targetUrl, :with => URI::regexp(%w(http https))
and validates_format_of :website, :with => URI::regexp(%w(http https))
.
Any hints will be very helpful. Thanks