How would I go about validating against spaces (for urls)
Instead I wish to use dashes.
You might want to clarify your question a bit more if you want a useful
answer.
What data are you trying to validate, and where?
Luke R. wrote:
You might want to clarify your question a bit more if you want a useful
answer.What data are you trying to validate, and where?
I’d like to validate urls without any spaces:
So this wouldn’t be allowed ‘new page’
But this would ‘new-page’
Is the url a field in an ActiveRecord object?
Richard W. wrote:
Is the url a field in an ActiveRecord object?
yes
I was thinking along the lines of
validates_format_of :url, :with => ‘ect’